php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #21955 date() feature request
Submitted: 2003-01-29 18:04 UTC Modified: 2003-02-26 15:10 UTC
From: mark dot young at vdhinc dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.3.0 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mark dot young at vdhinc dot com
New email:
PHP Version: OS:

 

 [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?")

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-26 00:12 UTC] sniper@php.net
Yes, and I'd like that PHP made coffee too.
Seriously, it's not that hard to put the formats you
use into a constant or variable..


 [2003-02-26 15:10 UTC] mark dot young at vdhinc dot com
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Sep 11 12:01:27 2024 UTC