> I have two fields in my form. When two dates are entered in these two > boxes, I need to find the diiference in calendar months and remaining days > between these two dates. This "Calendar months and remaining days" is > important. The functions that I know do not work for calendar months. > Can anyone help me and tell me how this could be achieved and are there > any PHP functions to do this?
You can use strtotime() (probably) to convert what's entered into a unix timestamp. From there you know how many seconds are in a day, so a little math can figure out how many days are between the two dates. You can use date() to find out the month of each one and do some more math... ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php