I have previously been able to do this with Joda DateTime objects but i'm unsure how i can get the last day of a given month for a ZonedDateTime instance with a timezone applied.
e.g
- A leap year February return 29
- April returns 30.
- December returns 31.
With Jodatime i've used dayOfMonth()
and getMaximumValue()
, but how can I do the equivalent with ZonedDateTime
in Java 11?