Re: Re: british date format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yeah, that would be the way to do it ;)

On Fri, May 9, 2008 at 3:54 PM, Shawn McKenzie <nospam@xxxxxxxxxxxxx> wrote:
> Shawn McKenzie wrote:
>>
>> André Medeiros wrote:
>>>
>>> Shawn,
>>>
>>> I think the idea here was to get a timestamp from a date in that
>>> format he was telling about.
>>>
>>> After replying however, I noticed that strptime is only implemented in
>>> PHP5. Sorry about that mate.
>>>
>>> On Fri, May 9, 2008 at 2:36 PM, Shawn McKenzie <nospam@xxxxxxxxxxxxx>
>>> wrote:
>>>>
>>>> Merca, Ansta Ltd wrote:
>>>>>
>>>>> Hi
>>>>>
>>>>> Anyone "dd/mm/yyyy" as a date variable? strtotime - works fine with
>>>>> "mm/dd/yyyy" but now with "dd/mm/yyyy". (PHP 4.x)
>>>>
>>>> setlocale()
>>>>
>>>> and then...
>>>>
>>>> http://pt.php.net/manual/en/function.strftime.php
>>>>
>>>> -Shawn
>>>>
>>>> --
>>>> PHP General Mailing List (http://www.php.net/)
>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>
>>>>
>> Couldn't see any other way.  *nix strtotime is supposed to use locale.
>>
> Fixed that for me:
>
> $date = '20/12/1971';
> $d = explode('/', $date);
> echo mktime(0 ,0, 0, $d[1], $d[0],$d[2])."\n";
>
>>
>> -Shawn
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux