Re: win32 Timestamp problem

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

 



Will this fit you needs?

<?php
$birthdate="xx.xx.xxxx";
$parth=explode(".",$birthdate);
$seconds=mktime(0,0,0,$parth[1],$parth[0],$parth[2]);
$seconds=time()-$seconds;
$age=date("Y",$seconds)-1970;
echo $age;

?>  


Am Mittwoch, 10. März 2004 12:31 schrieb Ford, Mike [LSS]:
> On 09 March 2004 20:36, J. Kevin C. Burton wrote:
> > Hey all, after reading documentation on the Win32 bug
> > regarding Timestamps
> > not being able to go prior than 1970..
> >
> > I am in need of a way to calculate someone's age.
> >
> > Has anyone found a fix or workaround for this bug? Or a way
> > to calculate age
> > without using the timestamp?
> >
> > They say that v5 of PHP will fix this issue, but I've been using every
> > stable release of PHP5 and it's a no go.
>
> No, it won't.  It's an operating system issue, and nothing PHP *can* fix.
>
> > Any help would be appreciated.
>
> Have you looked at the Calendar extension? http://www.php.net/calendar
>
> Cheers!
>
> Mike
>
> ---------------------------------------------------------------------
> Mike Ford,  Electronic Information Services Adviser,
> Learning Support Services, Learning & Information Services,
> JG125, James Graham Building, Leeds Metropolitan University,
> Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
> Email: m.ford@xxxxxxxxxxxxxx
> Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211

-- 
Sebastian Mangelkramer

IMAC - Information & Management Consulting
Blarerstraße 56,   D-78462 Konstanz
Tel. +49 (0)7531 - 90 39-12
Fax +49 (0)7531 - 90 39-47
E-Mail: sebastian.mangelkramer@xxxxxxx

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



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux