NYCPHP Meetup

[nycphp-talk] PHP5.3 adds EU date formatting.

csnyder chsnyder at gmail.com
Mon Mar 3 13:54:31 EST 2008


On Mon, Mar 3, 2008 at 12:50 PM, David Krings <ramons at gmx.net> wrote:

>  But isn't there already a way to format a date any way one likes to?
>


The desired magic was parsing, not formatting, British dates.

Unfortunately, date_create_from_format() isn't a replacement for
strtotime(), because it assumes you know exactly what format the date
is in. The best thing about strtotime() is that you can throw anything
at it (um, except for a British date) and it will work.

> In regards to date, the Canadian notation of year/month/day is what
> comes closest

Or the MySQL date, 2008-03-02. Again, the month-day order throws
non-US, non-engineers off.

-- 
Chris Snyder
http://chxo.com/



More information about the talk mailing list