src/Transformatika/Utility/Fn.php
public static function dateRangeArray($strDateFrom, $strDateTo, $dateFormat = 'Y-m-d')
    {
        //Mengambil nilai tanggal dari dua tanggal dengan format YYYY-MM-DD

        $arrayRange  = array();
        $t1        = $this->splitDate($strDateFrom, 'int');
        $t2        = $this->splitDate($strDateTo, 'int');
        $iDateFrom = mktime(1, 0, 0, $t1['month'], $t1['date'], $t1['year']);
        $iDateTo   = mktime(1, 0, 0, $t2['month'], $t2['date'], $t2['year']);

        if ($iDateTo >= $iDateFrom) {
            array_push($arrayRange, date($dateFormat, $iDateFrom)); // first entry

            while ($iDateFrom < $iDateTo) {
                $iDateFrom += 86400; // add 24 hours
                array_push($arrayRange, date($dateFormat, $iDateFrom));
            }
        }

        return $arrayRange;
    }
public static function dateRangeArray($strDateFrom, $strDateTo, $dateFormat = 'Y-m-d')
    {
        //Mengambil nilai tanggal dari dua tanggal dengan format YYYY-MM-DD

        $arrayRange  = array();
        $t1        = $this->splitDate($strDateFrom, 'int');
        $t2        = $this->splitDate($strDateTo, 'int');
        $iDateFrom = mktime(1, 0, 0, $t1['month'], $t1['date'], $t1['year']);
        $iDateTo   = mktime(1, 0, 0, $t2['month'], $t2['date'], $t2['year']);

        if ($iDateTo >= $iDateFrom) {
            array_push($arrayRange, date($dateFormat, $iDateFrom)); // first entry

            while ($iDateFrom < $iDateTo) {
                $iDateFrom += 86400; // add 24 hours
                array_push($arrayRange, date($dateFormat, $iDateFrom));
            }
        }

        return $arrayRange;
    }
public static function dateRangeArray ( $ strDateFrom , $ strDateTo , $ dateFormat = 'Y-m-d' ) { //Mengambil nilai tanggal dari dua tanggal dengan format YYYY-MM-DD
 $ arrayRange = array ( ) ; $ t1 = $ this -> splitDate ( $ strDateFrom , 'int' ) ; $ t2 = $ this -> splitDate ( $ strDateTo , 'int' ) ; $ iDateFrom = mktime ( 1 , 0 , 0 , $ t1 [ 'month' ] , $ t1 [ 'date' ] , $ t1 [ 'year' ] ) ; $ iDateTo = mktime ( 1 , 0 , 0 , $ t2 [ 'month' ] , $ t2 [ 'date' ] , $ t2 [ 'year' ] ) ; if ( $ iDateTo >= $ iDateFrom ) { array_push ( $ arrayRange , date ( $ dateFormat , $ iDateFrom ) ) ; // first entry
 while ( $ iDateFrom < $ iDateTo ) { $ iDateFrom += 86400 ; // add 24 hours
 array_push ( $ arrayRange , date ( $ dateFormat , $ iDateFrom ) ) ; } } return $ arrayRange ; }
Date Range Array
@param  Date
@param  Date
@param  string
@return Array
Date Range Array