|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-07-16 21:16 UTC] sniper@php.net
[2003-07-17 10:34 UTC] mgf@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 04:00:01 2025 UTC |
Description: ------------ In PHP4.3.2, the function date('W', $timestamp) behaves differently from PHP4.2.3 concerning the ISO8601 dates For example (timestamps has been written in simple form for readablility), date('W', '2003-12-31') reports 1 in PHP4.3.2 (incorrect? Mysql returns the same result) reports 53 in PHP4.2.3 (should be the correct behaviour?) (ISO8601 weeks starting on Monday, so i think you could sometimes have a 53rd week in the year?). It's difficult to differenciate same week between years as date('Y-W', '2003-12-31') reports '2003-1' Sorry for my english, Thanks for your time. Seb Reproduce code: --------------- $timestamp = strtotime("2003-12-31"); echo date('Y-W', $timestamp); > outputs '2003-1'