jodatime - How to check if a given date is not end of week, end of month and end of Quarter using java -
how check if given date not end of week, end of month , end of quarter
should not end of week, end of month , end of quarter
here partial answer:
localdate today = localdate.now(); localdate endofmonth = today.dayofmonth().withmaximumvalue(); system.out.println("today end of month: " + today.equals(endofmonth));
note similar simple solution not possible quarters because joda-time not support element (workaround or other library necessary). furthermore, similar solution calendar weeks using weekofweekyear()
instead of dayofmonth()
possible long want iso-8601-compatible calendar weeks start on monday , have @ least 4 days within calendar year (this excludes us-weeks!).
Comments
Post a Comment