java - Get first and last day of month using threeten, LocalDate -


i have localdate needs first , last day of month. how do that?

eg. 13/2/2014 need 1/2/2014 , 28/2/2014 in localdate formats.

using threeten localdate class.

just use withdayofmonth, , lengthofmonth():

localdate initial = localdate.of(2014, 2, 13); localdate start = initial.withdayofmonth(1); localdate end = initial.withdayofmonth(initial.lengthofmonth()); 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -