Post #199781
2026-01-31 17:25 UTC
@myfear@mastodon.online If you work with human-readable periods (ISO 8601) like "P7D" or "PT24H", mind that java.time.Period can only parse the former (no "T") and java.time.Duration only the latter. (Ask your favourite AI for a somewhat convoluted explanation. 😉) joda.time.Period parses both, and also mixed (parts before and after "T"). Make sure to reference a timezone and possibly absolute moment in time when calculating with Joda’s Period. So, Joda’s Period might be a keeper, even if you go java.time.
Replies (0)
No replies.