Re: i love strtotime but it is no use in New Zealand
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: i love strtotime but it is no use in New Zealand

From: Adam <anon@nowhere.com>
Date: Thu Apr 27 2006 - 12:44:00 CEST

On 25 Apr 2006 01:13:41 -0700, fletch wrote:

>> HOWEVER, this obviously does not work for the day/month vs month/day
>> scenario. That is, in New Zealand we use day/month/year, while the function
>> assumes it to be month/day/year.
>
>Doesn't setlocale() sort this out? What locale is the server your using
>running? I always thought strtotime() obeyed the current locale
>settings, strftime() certainly does.

Wouldn't you still have the problem of (let's say) US visitors
entering the date in the US format - regardless of the locale setting
on the server?

I tend to go for belt & braces - Erwin's 3-field solution. I just
create 3 (clearly labelled) drop-downs.

Adam.
Received on Mon May 1 03:05:58 2006