Re: Re: #21212 [Opn->Bgs]: strftime fails when crossing year

From: Date: Tue, 31 Dec 2002 04:45:12 +0000
Subject: Re: Re: #21212 [Opn->Bgs]: strftime fails when crossing year
References: 1 2  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969350511@lists.php.net to get a copy of this message
>> 12/31/2001 falls on a monday, it's ISO week ends on Sunday 1/6/2002, >> (six days fall in 2002, one falls in 2001) ergo %G for that date >> returns "2002". >> >> This is expected behavior for %G. Try using %Y instead. > > Maybe we can add this nice example to the manual? > I'm inclined not to clutter up an already busy manual page by spelling this out any simpler than it is already described. The definition of %G already says that alternate prior/subsequent years may be returned *and* makes reference to the difinition of %V which defines precisely how ISO years are defined. It also references %Y as an alternate. Unless others report problems with understanding this manual page as it is, I'd rather just file this under a user-rtfm problem. -Pollita

« previous php.doc (#969350511) next »