You are here: Re: PHP4 date parsing « PHP Language « IT news, forums, messages
Re: PHP4 date parsing

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация