Date / time things...

From: Date: Thu, 09 Aug 2001 15:13:21 +0000
Subject: Date / time things...
Groups: php.windows 
Request: Send a blank email to php-windows+get-8733@lists.php.net to get a copy of this message
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: wency@comelsoft.com Visit http://www.comelsoft.com

« previous php.windows (#8733) next »