public static function makeDatesListByRange(DateRange $range, IntervalUnit $unit, $hash = true)
 {
     $date = $unit->truncate($range->getStart());
     if ('Date' == get_class($range->getStart())) {
         $date = Date::create($date->toStamp());
     }
     $dates = array();
     do {
         if ($hash) {
             $dates[$date->toString()] = $date;
         } else {
             $dates[] = $date;
         }
         $date = $date->spawn('+ 1' . $unit->getName());
     } while ($range->getEnd()->toStamp() >= $date->toStamp());
     return $dates;
 }