Req #64242 [Asn->Nab]: Extend date() formats with week number of year, weeks starting on Sunday
| From: | kriscraig@php.net | Date: | Thu, 29 May 2014 09:49:46 +0000 |
| Subject: | Req #64242 [Asn->Nab]: Extend date() formats with week number of year, weeks starting on Sunday | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-185967@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64242&edit=1
ID: 64242
Updated by: kriscraig@php.net
Reported by: thbley at gmail dot com
Summary: Extend date() formats with week number of year,
weeks starting on Sunday
-Status: Assigned
+Status: Not a bug
Type: Feature/Change Request
Package: Date/time related
Operating System: ANY
PHP Version: 5.5.0alpha4
Assigned To: kriscraig
Block user comment: N
Private report: N
New Comment:
Per Derick's suggestion. Though I agree there could be valid uses for something like this,
implementing it would break standards compliance.
If you would like to pursue this further, please submit an RFC and make your case on the Internals
list.
Previous Comments:
------------------------------------------------------------------------
[2013-09-22 22:08:50] derick@php.net
PHP implements the ISO 8601 calendar, where weeks start with Monday - this should not be
implemented.
------------------------------------------------------------------------
[2013-02-19 07:14:17] thbley at gmail dot com
Description:
------------
Extend date() formats like
W ISO-8601 week number of year, weeks starting on Monday
with
V week number of year, weeks starting on Sunday
Example:
date("W V", strtotime("2012-12-30")); // 52 53
date("W V", strtotime("2012-12-31")); // 01 53
E.g. MySQL has date_format() formats:
%V Week (01..53), where Sunday is the first day of the week; used with %X
%v Week (01..53), where Monday is the first day of the week; used with %x
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64242&edit=1