What was the unix timestamp of last week, Monday 12:00 am?
| From: | René Fournier | Date: | Mon, 13 Apr 2009 02:12:08 +0000 |
| Subject: | What was the unix timestamp of last week, Monday 12:00 am? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-291406@lists.php.net to get a copy of this message | ||
I'm trying to write a [simple] function, such that:
function earlier_unix_timestamp () {
$now = mktime();
[...]
return $then; // e.g., 1238983107
}
Anyone have something already made? There seem to be many ways to skin this cat, with date() arithmetic, etc., but the exceptions (Jan 1, first day of the month, etc.) are driving me crazy.
...Rene