I'm looking for a reliable way to return the full date of a specified weekday (e.g. "Mon") for the current week.
Since today is Wednesday, June 13, 2012, I expected <?php echo date("Y-m-d", strtotime('Mon this week')); ?>
to result in 2012-06-11
, but instead php returns 2012-06-18
as though it interprets this week as meaning next week. Why this behavior and what should I be doing?
Thanks.
--Jeff
<?php echo date("Y-m-d", strtotime('last Mon',time())); ?>
? – Alterant$d=new DateTime('Mon this week'); echo $d->format('Y-m-d');
– Tibia