Req #64242 [Asn]: Extend date() formats with week number of year, weeks starting on Sunday
| From: | derick@php.net | Date: | Sun, 22 Sep 2013 22:08:50 +0000 |
| Subject: | Req #64242 [Asn]: 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-181742@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: derick@php.net
Reported by: thbley at gmail dot com
Summary: Extend date() formats with week number of year,
weeks starting on Sunday
Status: Assigned
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:
PHP implements the ISO 8601 calendar, where weeks start with Monday - this should not be
implemented.
Previous Comments:
------------------------------------------------------------------------
[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