14,958
edits
No edit summary |
No edit summary |
||
| Line 72: | Line 72: | ||
| | | | ||
| | | | ||
| PHP: (1) {{kbd | key=<nowiki>echo date('Y-m-d', strtotime("last Saturday")) . PHP_EOL;</nowiki>}} (2) {{kbd | key=<nowiki>echo date('Y-m-d', strtotime('last Saturday', strtotime("2018-03-04 00:01:00"))) . PHP_EOL;</nowiki>}} | | PHP<ref>[https://stackoverflow.com/questions/3742820/php-how-to-get-previous-sunday-of-a-specific-date-in-the-past PHP: How to get previous Sunday of a specific date in the past..? - Stack Overflow]</ref>: (1) {{kbd | key=<nowiki>echo date('Y-m-d', strtotime("last Saturday")) . PHP_EOL;</nowiki>}} (2) {{kbd | key=<nowiki>echo date('Y-m-d', strtotime('last Saturday', strtotime("2018-03-04 00:01:00"))) . PHP_EOL;</nowiki>}} | ||
|- | |- | ||
! This week | ! This week | ||
| Line 94: | Line 94: | ||
|} | |} | ||
== References == | |||
<References /> | |||
== Further reading == | |||
* PHP [http://php.net/manual/en/function.date.php date] function: w character (0 for Sunday through 6 for Saturday) or N character (1 for Monday through 7 for Sunday) | * PHP [http://php.net/manual/en/function.date.php date] function: w character (0 for Sunday through 6 for Saturday) or N character (1 for Monday through 7 for Sunday) | ||
* [https://support.office.com/zh-tw/article/WEEKDAY-%E5%87%BD%E6%95%B8-60e44483-2ed1-439f-8bd0-e404c190949a WEEKDAY 函數 - Office 支援] | * [https://support.office.com/zh-tw/article/WEEKDAY-%E5%87%BD%E6%95%B8-60e44483-2ed1-439f-8bd0-e404c190949a WEEKDAY 函數 - Office 支援] | ||