Rather than using mktime() and a loop, James can subtract the current timestamp from the timestamp of the date in question and divide that by the number of seconds in a day: Another usage could find itself in a class submitted by Kyle M Hall which aids in the creation of timestamps from the recent past for use with My SQL.
Rather than the looping and fine tuning of a date, Kyle can use the raw UNIX timestamps (this is untested code): If you are having an issue getting u to work so is everyone else.
Its complexity derives from the fact that the calculation is based on a combination of solar and lunar calendars.
Monday-Friday, excluding holidays) between any two given dates.
thanks all While this will work for the majority of years it will not work on years that are multiples of 100 but not multiples of 400 i.e.(2100).
A function not using php's date() function that will also account for this small anomaly in leap years: While is_leapyear_working will not return true for the few non-leap years divisible by four I couldn't tell you if this is more or less efficient than using php's date() as an even earlier poster suggested: The following function will return the date (on the Gregorian calendar) for Orthodox Easter (Pascha).
The solution that I am using which I found on another site(so not taking credit) is to use this: date("Y/m/d H:i:s").
substr((string)microtime(), 1, 6);that will give you: yyyy/mm/dd hh:ii:ss.uuuuuuhope this helps someone in need!