|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[1999-05-30 00:55 UTC] zeekamotay at hotmail dot com
The date() function formatting characters g and G don't work as documented.
This script:
<? echo date("l, F jS h:i a"); ?>
generates this output:
Sunday, May 30th 01:42 am
But this script:
<? echo date("l, F jS g:i a"); ?>
generates this output:
Sunday, May 30th g:42 am
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Jul 01 00:00:02 2026 UTC |
Are you sure you're running 3.0.8 (double-check phpinfo())? Works fine for me here. These formatting characters weren't supported in earlier versions. Jim On May 30, zeekamotay@hotmail.com wrote: > From: zeekamotay@hotmail.com > Operating system: RedHat 6.0 > PHP version: 3.0.8 > PHP Bug Type: Misbehaving function > Bug description: date() formatting characters g and G don't work > > The date() function formatting characters g and G don't work as documented. > > This script: > <? echo date("l, F jS h:i a"); ?> > generates this output: > Sunday, May 30th 01:42 am > > But this script: > <? echo date("l, F jS g:i a"); ?> > generates this output: > Sunday, May 30th g:42 am