Req #49914 [Opn->Fbk]: DateInterval doesn't implement comparison functions

From: Date: Fri, 24 Mar 2017 06:28:58 +0000
Subject: Req #49914 [Opn->Fbk]: DateInterval doesn't implement comparison functions
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208041@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=49914&edit=1 ID: 49914 Updated by: heiglandreas@php.net Reported by: aharvey@php.net Summary: DateInterval doesn't implement comparison functions -Status: Open +Status: Feedback Type: Feature/Change Request Package: Date/time related Operating System: * PHP Version: 5.3SVN-2009-10-18 (SVN) Block user comment: N Private report: N New Comment: Just one small question to those that commented here: How would you compare those two intervals: P1M and P30D - which one is the greater one? is it P1M even though I'm currently in february? Or is it P30D even though I'm currently in August? What about PT24H30M and P1D? Under certain circumstances a Day can have more or less that 24 hours (DST-transition) Even though those might be edge-cases exactly those edge-cases need to be handled or they will show up here in the bug-tracker. So I'd really like to get some feedback on how you think those edge-cases should be handled. Otehrwise there are some userland libraries that handle most aspects of Interval-COmparison but not those edge-cases… (f.e but not limited to https://packagist.org/packages/org_heigl/dateintervalcomparator) Previous Comments: ------------------------------------------------------------------------ [2015-12-03 14:28:09] will dot tinsdeall at mercianlabels dot com Any closer to applying a fix on this? It's a real shame it didn't make it into 7.0 ------------------------------------------------------------------------ [2015-05-24 15:44:46] cmb@php.net Related To: Bug #68187 ------------------------------------------------------------------------ [2012-09-26 15:25:04] jrbeaure at uvm dot edu I need to be able to compare date intervals. ------------------------------------------------------------------------ [2012-03-23 00:35:50] kavi at postpro dot net So... patch submitted 2.5 years ago. Sup guys? ------------------------------------------------------------------------ [2011-11-25 11:01:25] albertcasademont at gmail dot com Did this patch make it into the trunk? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=49914 -- Edit this bug report at https://bugs.php.net/bug.php?id=49914&edit=1

« previous php.bugs (#208041) next »