Page 1 of 1

Date compare and conversion functions.

Posted: Mon Nov 25, 2002 11:49 am
by PingLeeQuan
I've been looking for a date function/utility to compare 2 dates or even convert a normal date to jullinan date. I looked int to the PHP MAnula but found no such thing. Any suggestions.

CASE:
I have a news tool that i need to perform date validation/conversion.

thanks
--quan

Posted: Tue Nov 26, 2002 4:05 am
by twigletmac
You could convert the 2 dates to timestamps and then do all the comparisons/maths on them you like:
http://www.php.net/manual/en/ref.datetime.php

You can convert UNIX timestamps to Julian Day using one of the calendar functions:
http://www.php.net/manual/en/ref.calendar.php

Mac