|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #47185 modification to date() function
Submitted: 2009-01-21 17:38 UTC Modified: 2017-01-11 16:25 UTC
Avg. Score:4.2 ± 0.8
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:2 (50.0%)
From: pinh3ad at hotmail dot com Assigned:
Status: Wont fix Package: Date/time related
PHP Version: 5.2CVS-2009-01-21 (snap) OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
25 - 17 = ?
Subscribe to this entry?

 [2009-01-21 17:38 UTC] pinh3ad at hotmail dot com
A nice addition to the date function for month would be a predefined AP-style(Associated press style) month names. (i.e. date("p j, Y"); "p" being the AP month name??). AP-style month abbreviations are used a lot for publication dates and sourcing of content.  AP Month abbreviations are different from a 3 letter abbreviation.(Jan., Feb., March, April, May, June, July, Aug., Sept., Oct., Nov., Dec.). Short month names are spelled out, long names are abbreviated.  This is a fairly common practice editorially speaking. A really nice to have feature include.



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-23 21:21 UTC]
-Package: Feature/Change Request +Package: Date/time related -Operating System: any +Operating System: *
 [2014-03-12 14:42 UTC] coden at bravozulu dot bz
I ran into this issue, and the solution I came up with was to write my own <a href="">AP Style month format function</a>. It's actually a pretty simple use of strt_replace() to find month names in PHP date strings and convert them to AP Style. This shouldn't be done on any date that needs further processing, since PHP's other date formatting functions may not be able to consistently read all of the AP style dates.

You can check out the function here:
 [2017-01-11 16:25 UTC]
-Status: Open +Status: Wont fix
 [2017-01-11 16:25 UTC]
This issue is by now over 7 years old and targets an unsupported version of PHP.

As it is a very special usecase and can be done in userland without issue I'm closing this.

Should need arise feel free to reopen the issue.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Dec 07 23:05:54 2022 UTC