Last active
August 29, 2015 13:56
-
-
Save jeremymcminn/8972835 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 | |
| $begin = new DateTime('now'); | |
| $beginformat = $begin->format("Y-m-d"); | |
| $beginfinal = strtotime($beginformat); | |
| $end = $begin->modify("+90 day"); | |
| $endformat = $end->format("Y-m-d"); | |
| $endfinal = strtotime($endformat); | |
| $dates = array(); | |
| for ($i=$beginfinal; $i<=$endfinal; $i+=86400) { | |
| $dates[] = array("date" => date("Y-m-d", $i), "url" => "http://".$_SERVER['HTTP_HOST'] . '/be/booking-search?field_booking_date_value%5Bvalue%5D%5Bdate%5D'"); | |
| } | |
| $dates = json_encode($dates); | |
| print_r($dates); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment