Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70357 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53228 invoked from network); 24 Nov 2013 19:10:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Nov 2013 19:10:32 -0000 Authentication-Results: pb1.pair.com header.from=mjpelmear@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=mjpelmear@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.50 as permitted sender) X-PHP-List-Original-Sender: mjpelmear@gmail.com X-Host-Fingerprint: 209.85.128.50 mail-qe0-f50.google.com Received: from [209.85.128.50] ([209.85.128.50:41695] helo=mail-qe0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A6/20-51929-62F42925 for ; Sun, 24 Nov 2013 14:10:30 -0500 Received: by mail-qe0-f50.google.com with SMTP id 1so919137qec.9 for ; Sun, 24 Nov 2013 11:10:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=Bl2ntMtS9lNClv98mqOgEkyWoTOvKsR5QKHrx2IEOu4=; b=AsaCYpPuhBZXaOG+4C3luPHF+m0xCHvacKV8IR31EMt967UVUCi42ICq1opeIw22Av O2KL3cbE5z2Ul+oBEBPqgWEbcJI96CfbnQdh7BFzt4JtHkm5v5ohvSrcKZg4xAjN3k1Y tQB0X2uUHe/k4lLP1IGGbCiRQhQQ9ckjbUMUfL/H5bDGNCdxsf9+j4lXQKSFqu703Q9L l7ZnxTS2hh5vElrZsRR9KpLs5AuhFEYjYfWMKGD78SWw0a4MAdygV3a2Gr78HyA65KMY QLxeQifyQaYORLZ5HS+bAS8boNsJuLAoufHBuXBFg4XiCNld4QAe7iuRFr0MV0bI72kH qOVw== X-Received: by 10.224.47.3 with SMTP id l3mr39862161qaf.25.1385320227374; Sun, 24 Nov 2013 11:10:27 -0800 (PST) Received: from [192.168.1.100] (ool-44c428d9.dyn.optonline.net. [68.196.40.217]) by mx.google.com with ESMTPSA id nq5sm52432329qeb.8.2013.11.24.11.10.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 24 Nov 2013 11:10:26 -0800 (PST) Message-ID: <52924F20.2030204@gmail.com> Date: Sun, 24 Nov 2013 14:10:24 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Bug #66156 From: mjpelmear@gmail.com (Matt Pelmear) Evidently I've not been clear enough in my bug ticket #66156 (https://bugs.php.net/bug.php?id=66156) so I'll bring it to the group here. In Derick's comment (while marking this as "not a bug") he stated that "If you pass in an ambiguous string for a format, there is nothing we can do." I agree completely. However, "!ndY" is *not* ambiguous. I think the ticket was just misread, since he mentioned "!jnY" specifically in his comment. "!ndY" is a one or two digit number, followed by a two digit number, followed by a four digit number. To use Derick's example, "1112013", when parsed with "!ndY", should be unambiguously January 11th, 2013 (because the date *must be* two digits, due to the use of "d"). There is no case that is ambiguous with this format, unless you are only thinking about parsing it from left-to-right. That doesn't make the format ambiguous; that just makes it incompatible with the current algorithm, which is fine. All I'm suggesting is that if we don't plan to support this *unambiguous* date format properly (because of the effort involved in doing so), we should have an error message that indicates such a decision, as opposed to simply receiving bad output for a format that should work, regardless of how strange it is. At the very least the official documentation should indicate that the algorithm always works from left to right, and as such could have unexpected results in some fringe cases. Maybe that is the best solution. I've offered to do the work. I'm just looking for an agreement that an error message returned in the standard format for that method is acceptable. I apologize for the degree of frustration here, but this is the second time I've submitted a ticket that was a real issue but was misread and dismissed. (The other issue was fixed afterward, when someone else raised the same issue on the list here.) This one might be a minor detail, but don't details matter? -Matt