php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1469 date() formatting characters g and G don't work
Submitted: 1999-05-30 00:55 UTC Modified: 1999-06-01 15:25 UTC
From: zeekamotay at hotmail dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.8 OS: RedHat 6.0
Private report: No CVE-ID: None
 [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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-05-30 01:20 UTC] Jim Winstead <jimw at php dot net>
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

 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Jul 01 09:00:01 2026 UTC