Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62629 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22494 invoked from network); 1 Sep 2012 10:36:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Sep 2012 10:36:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.170 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.210.170 mail-iy0-f170.google.com Received: from [209.85.210.170] ([209.85.210.170:54277] helo=mail-iy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FF/E0-17065-735E1405 for ; Sat, 01 Sep 2012 06:36:40 -0400 Received: by iamm10 with SMTP id m10so6781546iam.29 for ; Sat, 01 Sep 2012 03:36:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ieV+suIsnjvJZtzicAwXKQDcqubwRX1l1matMTA0eMM=; b=iDBfw5iaMef+Yo99yIY2NF/F48HEBvLvRNB+hqEMyrEbkqpIz4mu9bXMHagK0+Q9KX cTOlFpZqaKz9ybn2Ku6pQX1vfafhckdLrTwqjUTW36OhmFNBmik6OYAK4PSXe0mzasrD BNd/6XWoiM+vtgxvwUTNlRtpc8gYPCSkUheGYvecjjBfNz8XMPVvqHAYcIRySyAo8DpE 9L83kMSTLT0hsvd0kzWHIpuGhnwAIlsQVdoCW4BBaHNLZb6d+80amd80aCOXKW+xcIzD uhSWfb5euz06G/uKJJCaq4EwLYhGjlyKgcuTL52ySv8VaogR+tRvFaaAA55uRzSE9HJ/ pO+Q== MIME-Version: 1.0 Received: by 10.50.159.130 with SMTP id xc2mr5677993igb.33.1346495795326; Sat, 01 Sep 2012 03:36:35 -0700 (PDT) Received: by 10.64.60.40 with HTTP; Sat, 1 Sep 2012 03:36:35 -0700 (PDT) In-Reply-To: References: Date: Sat, 1 Sep 2012 12:36:35 +0200 Message-ID: To: Will Fitch Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] RFC for Adding __toString to DateTime From: pierre.php@gmail.com (Pierre Joye) hi Will, On Sat, Sep 1, 2012 at 12:14 PM, Will Fitch wrote: > I would like to officially introduce an RFC with a patch to implement > __toString to DateTime. This is a commonly requested feature that goes > unanswered mostly because of the inability to agree on a default pattern. > > In short, the patch uses the ISO-8601 format as the default pattern. The > pattern may be changed via setDefaultPattern and date_default_pattern_set, > as explained in the RFC. > > The link to the RFC and patch are here: > https://wiki.php.net/rfc/datetime_tostring. > > While I know this isn't as interesting as many of the current proposals > going on, I'm hoping you can give this RFC a look. It would be better to name the format method setDefaultFormat instead of setDefaultPattern, to be consistent with the rest of the API. (not saying I like the idea or not, only a 1st comment :) Cheers, -- Pierre @pierrejoye