ID:               22711
 Updated by:       [EMAIL PROTECTED]
 Reported By:      unix-guy at pacbell dot net
-Status:           Open
+Status:           Wont fix
 Bug Type:         Feature/Change Request
 Operating System: All
 PHP Version:      4CVS-2003-03-14 (stable)
 New Comment:

Use the strftime function, which already supports this:

%V - The ISO 8601:1988 week number of the current year as a decimal
number, range 01 to 53, where week 1 is the first week that has at
least 4 days in the current year, and with Monday as the first day of
the week. (Use %G or %g for the year component that corresponds to the
week number for the specified timestamp.)


Derick


Previous Comments:
------------------------------------------------------------------------

[2003-03-14 14:21:10] unix-guy at pacbell dot net

The date() function should provide a way to return the ISO 8601 year.
As of yesterday's snap (STABLE-20030313), the  call:

date("Y W", 1041321600) 

returns "2002 1", which could be argued is correct as it returns the
year and the ISO 8601 week, however in the context it is wrong and
should probably return "2003 1".

I think there should be a formatting option to return ISO 8601 year as
well as week to clear up any confusion.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=22711&edit=1

Reply via email to