On Period and DateTimeFormatter

Archie Cobbs archie.cobbs at gmail.com
Wed Jun 18 17:53:08 UTC 2025


Period is like Duration - they are both "lengths of time", just using
different units (so they are both a TemporalAmount).

Similar to how LocalDateTime vs. Instant are both "points in time", just
using different units (so they are both a Temporal).

But you bring up a good point - perhaps CalendarDuration would have been a
better name than Period...

-Archie

On Wed, Jun 18, 2025 at 12:24 PM Pavel Rappo <pavel.rappo at gmail.com> wrote:

> We are talking about a period, not an interval. I used the word
> "interval" in my previous email in the sense close to that def. #5
> from your dictionary link:
>
> > : a set of real numbers between two numbers either including or
> excluding one or both of them
>
> So to me, an interval between two dates logically consists of all
> (time) instants between its both ends.
>
> Alright, your reply kinda tips the scales in favour of "it's just me".
> Perhaps others don't have a similar issue with java.util.Period.
>

-- 
Archie L. Cobbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20250618/b855732d/attachment.htm>


More information about the core-libs-dev mailing list