Hi
Am 2026-06-18 17:20, schrieb Seifeddine Gmati:
[…] float […] Could be added in the future though.
Yes, my reply was not intended to be a “we are definitely against
floats”, but more a “floats are not completely obvious to handle, so we
rather think about the consequences later”.
Another nitpick: I think the namespace should be `DateTime` if this is
supposed to be start of a new API that covers both date and time, so we
don't end up with two namespace later (which will share alot of things
back
and forth).
The `Time` namespace matches that of most references we looked at.
`std::time` in Rust, `java.time` in Java, `time` in Golang. JavaScript
calling it Temporal is the “odd person out”. Personally I also think of
“Time” as the generic concept that also includes “Dates”.
Thus the upcoming classes to also handle “calendar dates” and “time as
shown on a clock” would be appropriately located in the `Time`
namespace. Java uses `java.time.ZonedDateTime` for the closest
equivalent to PHP’s existing `DateTimeImmutable` (and
`java.time.Instant` for timezone-less points in time). See
https://docs.oracle.com/javase/8/docs/api/java/time/package-summary.html#package.description
for a description of the class hierarchy and relationships.
Best regards
Tim Düsterhus