Currently browsing posts found in July2007


PHP - calculate days or nights from two dates using php

July 5th, 2007 at » Comments (0)

This function returns the difference of two dates in whole days.  This is great for such uses as hotel calendars to work out how many nights someone would be staying or to give a count down to a specified date.
The input needs two dates; the start ($Date1) and finish ($Date2). 
 This function uses the php mktime function.
The date input is yyyy/mm/dd […]