Need to find the timestamp for the first minute of the first day of the current week.
What is the best way to do this?
<?php
$ts = mktime(); // this is current timestamp
?>
If Monday is your first day:
$ts = mktime(0, 0, 0, date("n"), date("j") - date("N") + 1);
If you think Monday is the first day of the current week...
$ts = strtotime('Last Monday', time());
If you think Sunday is the first day of the current week...
$ts = strtotime('Last Sunday', time());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With