GDM/Framework/Types/Date.php
static function daysOfTheWeek($startFrom = 'Monday', $format = 'l')
    {
        $result      = [];
        $start       = new self($startFrom);
        $interval    = \DateInterval::createFromDateString('1 day');
        $recurrences = 6;
        foreach (new \DatePeriod($start, $interval, $recurrences) as $date) {
            $result[] = $date->format($format);
        }
        return $result;
    }
static function daysOfTheWeek($startFrom = 'Monday', $format = 'l')
    {
        $result      = [];
        $start       = new self($startFrom);
        $interval    = \DateInterval::createFromDateString('1 day');
        $recurrences = 6;
        foreach (new \DatePeriod($start, $interval, $recurrences) as $date) {
            $result[] = $date->format($format);
        }
        return $result;
    }
static function daysOfTheWeek ( $ startFrom = 'Monday' , $ format = 'l' ) { $ result = [ ] ; $ start = new self ( $ startFrom ) ; $ interval = \ DateInterval :: createFromDateString ( '1 day' ) ; $ recurrences = 6 ; foreach ( new \ DatePeriod ( $ start , $ interval , $ recurrences ) as $ date ) { $ result [ ] = $ date -> format ( $ format ) ; } return $ result ; }
Returns and array of all the days in a week

@param string $startFrom [optional]<p>Day to start from. eg Monday will return an array starting witht the first element as Monday and the last as Sunday
@param type $format [optional]<p>Format to return the days as. eg l will return full names eg Monday, N will return 1 for Monday 7 for Sunday, D will return Mon to Sun</p>
@return array <p>The array containing all the days of the week in the specified format</p>
@link http://www.php.net/manual/en/datetime.formats.php Date and Time Formats
Returns and array of all the days in a week