List all dates between 2 dates

Returns array of all dates between 2 specified.

php
fork add to bundle source
function dates_between($start, $end) { $period = new DatePeriod( new DateTime($start), new DateInterval('P1D'), new DateTime($end) ); foreach ($period as $key => $value) { $list[] = $value->format('Y-m-d'); } return $list; }

usage

load_function('dates_between'); $dates = dates_between('2019-10-10', '2019-11-11'); print_r($dates); // Array // ( // [0] => 2019-10-10 // [1] => 2019-10-11 // [2] => 2019-10-12 // ... // [31] => 2019-11-10 // )
← how to use this in app?
create log ...inout