#33452 [Asn->Csd]: date('Y-W', strtotime('2005-1-1')) returns '2005-53'

From: Date: Thu, 30 Jun 2005 21:40:26 +0000
Subject: #33452 [Asn->Csd]: date('Y-W', strtotime('2005-1-1')) returns '2005-53'
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-81241@lists.php.net to get a copy of this message
ID: 33452 Updated by: derick@php.net Reported By: mehran20 at hotmail dot com -Status: Assigned +Status: Closed Bug Type: Feature/Change Request Operating System: winXP PHP Version: 4.3.10 Assigned To: derick New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2005-06-23 13:33:17] derick@php.net I'll take a look at it, but it's a feature request, not a bug. ------------------------------------------------------------------------ [2005-06-23 12:59:29] mehran20 at hotmail dot com Description: ------------ Well I've seen so many bugs reported in this discussion, but not exactly this one. The fact is, it's not a bug, more like a defect. Date function lacks a format to return the year when used with 'W'. For example mySQL has '%X' for function date_format. Reproduce code: --------------- date('Y-W', strtotime('2005-1-1')) Expected result: ---------------- 2004-53 Actual result: -------------- 2005-53 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33452&edit=1

« previous php.bugs (#81241) next »