You can try this library for PHP Date and time
http://nuclearscripts.com/php/scripts-and-programs/date-and-time/php-date-library.html
Quoting from there
The PHP Date Library is collection of
professional native PHP functions to
work with dates. It does not require
any PHP extensions. This library
includes most useful functions to work
with dates. It includes functions to
validate the date, shift date by given
amount of days, calculate difference
between two dates, calculate week
number for given date and much more.
It properly handles leap years and is
ISO compatible. Professional
programmer has spent 3+ days to study
the subject, code the library, write
manual and put it all here.
I havn't tested it personally.