Does anybody has an algorithm, which takes 2 different dates (in format
xxxx-xx-xx xx:xx:xx and date1<date2)
and returns the difference as:
"The requested period consists of X years, X months, X weeks, X days, X
hours, X minutes, X seconds"
For example: With date1='2001-08-09 00:00:00' date2='2001-08-10 01:02:03'
this code must return:
"The requested period consists of 0 years, 0 months, 0 weeks, 1 days, 1
hours, 2 minutes, 3 seconds"
Weeks, days, hours, minutes and seconds can be calculated easily, but months
and years?
Any suggestions are welcome.
10x in advance.
--
________________________________
Ventsyslav Vassilev
Comel Soft Multimedia
Sofia, Bulgaria
ICQ UIN: 11199819
e-mail: [EMAIL PROTECTED]
Visit http://www.comelsoft.com
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]