User Contributed Notes 4 notes

In addition to canby23 at ms19 post:It's a very bad idea to consider day having 24 hours (86400 secs), because some days have 23, some - 25 hours due to daylight saving changes. Using of mkdate() and strtotime() is always preferred. strtotime() also has a very nice behaviour of datetime manipulations:<?phpecho strtotime ("+1 day"), "\n";echo strtotime ("+1 week"), "\n";echo strtotime ("+1 week 2 days 4 hours 2 seconds"), "\n";echo strtotime ("next Thursday"), "\n";echo strtotime ("last Monday"), "\n"; ?>

I thought best to show a posseble way to go about bypassing the end month issue where the first day in a new month will have the monday of the week that it falls in - in the old month. Use the numbering of days as the constant and work you way from there.