java - Joda Time Manipulation get 15th and last day of month -
how can 15th , last day of month in joda time in loop?
this code looks like:
datetime initdate = new datetime(2015,1,31,0,0); for(int = 0; > 4; i++){ initdate = initdate.plusdays(15); system.out.println(initdate.tostring("yyyy-mm-dd"); } i want result this:
2015-2-15 2015-2-28 2015-3-15 2015-3-30
for(int = 0; < 4; i++){ initdate = initdate.plusmonths(1); initdate = initdate.withdayofmonth(15); system.out.println(initdate.tostring("yyyy-mm-dd")); system.out.println(initdate.dayofmonth().withmaximumvalue().tostring("yyyy-mm-dd")); } something that?
Comments
Post a Comment