Created
October 17, 2017 02:00
-
-
Save wwwjsw/e88a6e521cb3fa67a9be013ec003af04 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $start = new DateTime('-7 days', new DateTimeZone('UTC')); | |
| $period = new DatePeriod($start, new DateInterval('P1D'), 7); | |
| foreach ($period as $date) { | |
| echo $date->format('D d-m-Y').'<br>'; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment