Re: [RFC] Duration class
| From: | Tim Düsterhus | Date: | Mon, 22 Jun 2026 20:31:53 +0000 |
| Subject: | Re: [RFC] Duration class | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-131482@lists.php.net to get a copy of this message | ||
Hi
On 6/22/26 17:34, Andreas Heigl wrote:
I just think we do not need a separate "Duration" and later a "Time" class when they both - in essence - hold the same information.The Internals mailing list is not the correct location to debate philosophical questions. Humans consider
Durations and Times to be different concepts. The difference between “meeting is (in/at) 10:00” is the difference between Duration and Time. If you conflate those, you end up being late. Similarly if I call sleep(new Time(0, 10, 0)), I'm expecting the process to sleep until 10 past whatever midnight comes next, not for 10 minutes.
Best regards
Tim Düsterhus