jodatime - How to check if a given date is not end of week, end of month and end of Quarter using java -


  1. 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

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -