Re: DateInterval bug

From: Date: Sun, 12 Apr 2015 19:18:04 +0000
Subject: Re: DateInterval bug
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-85775@lists.php.net to get a copy of this message
On 12/04/15 19:57, Peter Lind wrote: > Is there a good explanation for this behaviour (which applies both to > DateTime::add and DateTime::sub)? I've tried searching the internals list > but couldn't see any discussion of it. It seems like a bug that never got > fixed to the point where there are tests to make sure things are still > calculated wrong. This is where it simply is not possible to use the expanded value with any sense of reality. All of my work with genealogical data has always worked in 'days', and while an interval can be displayed as an approximate number of years, even this will be wrong if the period goes over a leap year or not. Obviously months have the same random results over February, so adding 1 month 30 days is simply meaningless? You need more detail to decide just what length that month is! -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

« previous php.internals (#85775) next »