|
Posted by Rik on 02/26/07 09:47
On Sun, 25 Feb 2007 20:42:56 +0100, Preben <64bitNONOSPAMno@mailme.dk>
wrote:
>> How do I parse a date with PHP version 4.
>> The problem is that the date-format is like:
>> d-m-Y ( 15-08-2006 )
>> but strtotime won't accept this even though the setlocale function
>> has been used:
>> setlocale( LC_ALL, "da_DK", "da", "dan", "danish", "da_DK.ISO8859-1" );
>
> I tried to list all the locales on the server - and there are none.. So
> that's probably why.
>
> So now I just used the split-function to parse the date manually.
Thank you for this wonderfull example against using strtotime(). Never
liked the unpredictability of this function :-)
--
Rik Wasmus
[Back to original message]
|