| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
  [2003-01-29 18:04 UTC] mark dot young at vdhinc dot com
 I'd like to see the date() function have some predefined common date formats:
date("1") = "2002-1-31"
date("2") = "January 31, 2002"
date("3") = etc...
I constantly keep looking up the little letters to make various super common date formats.  ("Is the month an F or an M or an m?")
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 15:00:01 2025 UTC | 
Of course it's easy. The point is, the codes are difficult to remember, so I always have to look them up for every new use of date. I was suggesting that 5 or 10 of the most common date formats be predefined. like date("1") would be defined as date("F j, Y"), as a simple example. This way, PHP developers would only need to remember the single code that fits the date format they use most often, instead of remembering that "F" is a month name. It was a simple suggestion I thought you guys could very easily implement, and would benefit the community. There was no need for sarcasm.