Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85775 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71836 invoked from network); 12 Apr 2015 19:18:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Apr 2015 19:18:10 -0000 Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 217.147.176.214 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.214 mail4-2.serversure.net Linux 2.6 Received: from [217.147.176.214] ([217.147.176.214:45077] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 00/B0-62743-FE4CA255 for ; Sun, 12 Apr 2015 15:18:08 -0400 Received: (qmail 1750 invoked by uid 89); 12 Apr 2015 19:18:04 -0000 Received: by simscan 1.3.1 ppid: 1744, pid: 1747, t: 0.0676s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.8?) (lester@rainbowdigitalmedia.org.uk@109.156.131.40) by mail4.serversure.net with ESMTPA; 12 Apr 2015 19:18:04 -0000 Message-ID: <552AC4EC.6040406@lsces.co.uk> Date: Sun, 12 Apr 2015 20:18:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] DateInterval bug From: lester@lsces.co.uk (Lester Caine) 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