Hello, On Mon, 22 Jun 2026 at 09:42, <[email protected]> wrote: > I have looked up the implementations of other Duration classes you mentioned > - Go, Java, Rust - none of them have such kind of negative flag.
For reference, brick/date-time's Duration class also allows seconds to be negative instead of storing a separate flag: https://github.com/brick/date-time/blob/8a41dbf7c7a63b21fa511dfcb3794a50d2a3dbaa/src/Duration.php The nanoseconds are always non-negative, so a duration of negative half a second would be stored as -1 seconds and 500,000,000 nanoseconds. Best regards, Paul
