Days before

From LemonWiki共筆
Revision as of 10:35, 7 April 2021 by Planetoid (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

7 days before[edit]

7 days before today[1]:

echo date('Y-m-d', strtotime('-7 days'));

7 days before the specific date e.g. 2021-02-28:

echo date('Y-m-d', strtotime('2021-02-28' . '-7 days'));
// will return 2021-02-21

References[edit]