<?php
$F = strftime("%F") ? "%F" : "%Y-%m-%d";
foreach (array("Sat 2016-07-30", "Sun 2016-07-31", "Mon 2016-08-01", "Tue 2016-08-02") as $ref) {
$ref = strtotime($ref);
echo strftime("Relative to %a $F, ", $ref);
echo strftime("this week = %a $F, ", strtotime("this week", $ref));
echo strftime("next week = %a $F\n", strtotime("next week", $ref));
}
preferences:
49.78 ms | 402 KiB | 5 Q