Post #4007459
2026-07-21 21:01 UTC
@timwolla@phpc.social used your proof of concept as a basis to add support for Time\Duration in my Tokei package. I will wait for the vote result to see if I need to use Duration::sub or Duration::subtract :) ... Currently using the later.
https://github.com/bakame-php/tokei/blob/main/lib/Time/Duration.php
Replies (2)
-
@timwolla@phpc.social 2026-07-22 08:14
@nyamsprod@phpc.social Overflow should be TimeException, not ValueError.
-
@timwolla@phpc.social 2026-07-22 08:11
@nyamsprod@phpc.social It will be `sub()` either way: `sub()` is the established cross-language name, and also the result of the informal poll I had. The vote is only about the 4 methods listed in the voting operations.