Returns the days in this week.

@return  Day[]
182625
public function days()
    {
        if (!isset($this->days)) {
            $clonedStart = clone $this->weekStart;
            $this->days = array();
            for ($i = 0; $i < 7; $i ++) {
                $thisDay = new Day($clonedStart);

                if (
                    $this->containingMonth
                    && $this->containingMonth->firstDay()->format('m') != $clonedStart->format('m')
                ) {
                    $thisDay->setIsOverflow(true);
                }

                $this->days[] = $thisDay;
                $clonedStart->modify('+1 day');
            }
        }
        return $this->days;
    }
653585
public function getDays()
    {
        $days = array();
        foreach ($this->getDatePeriod() as $date) {
            $days[] = $this->getFactory()->createDay($date);
        }

        return $days;
    }
571954
public function getDates()
    {
        $defaults = [static::CREATED_AT, static::UPDATED_AT];

        return $this->timestamps ? array_merge($this->dates, $defaults) : $this->dates;
    }
1264620
protected function getDates()
    {
        $date = new \DateTime ( "now" );
        $date->setTimezone ( new \DateTimeZone ( "America/Sao_Paulo" ) );

        $final = $date->format ( "Y-m-d\TH:i:s" );

        $dateInterval = "P" . ( string ) $this->_days . "D";
        $date->sub ( new \DateInterval ( $dateInterval ) );
        $date->setTime ( 00, 00, 00 );
        $initial = $date->format ( "Y-m-d\TH:i:s" );

        return [
            'initial' => $initial,
            'final'   => $final
        ];
    }
475475
public function load_choices() {
        if (is_array($this->choices)) {
            return true;
        }
        $this->choices = array();
        $days = array('sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday');
        foreach ($days as $day) {
            $this->choices[$day] = get_string($day, 'calendar');
        }
        return true;
    }
1020523
protected SortedSet<WeekDay> getWeekDays() {

        SortedSet<WeekDay> result = new TreeSet<>();
        for (CmsCheckBox box : m_checkboxes) {
            if (box.isChecked()) {
                result.add(WeekDay.valueOf(box.getInternalValue()));
            }
        }
        return result;
    }
452621
public static function weekdays($num = 1): array
    {
        $days = [];
        $day = self::parse(Date('Y-m-d'));
        while (count($days) < $num) {
            if (!$day->isWeekend()) {
                $days[] = clone $day;
            }
            $day->addWeekday();
        }
        return $days;
    }
289102
public static function weekRange()
    {
        $timestamp = time();
        return [
            strtotime(date('Y-m-d', strtotime("+0 week Monday", $timestamp))),
            strtotime(date('Y-m-d', strtotime("+0 week Sunday", $timestamp))) + 24 * 3600 - 1
        ];
    }
17163
public static function getCurrentDayOfWeek()
    {
        $now = new DateTime();

        $year = $now->format('Y');
        $month = $now->format('m');
        $day = $now->format('d');

        return self::getDayOfWeek($year, $month, $day);
    }
796622
public static function getPeriodToFrequency()
    {
        return array(
            Schedule::PERIOD_NEVER => Piwik::translate('General_Never'),
            Schedule::PERIOD_DAY   => Piwik::translate('General_Daily'),
            Schedule::PERIOD_WEEK  => Piwik::translate('General_Weekly'),
            Schedule::PERIOD_MONTH => Piwik::translate('General_Monthly'),
        );
    }
693930
private function getWeekDays()
    {
        if (empty(self::$weekDays) && ($this->translator instanceof TranslatorInterface)) {
            self::$weekDays = [
                $this->translator->trans('calendar.weekdays.monday', [], 'default'),
                $this->translator->trans('calendar.weekdays.tuesday', [], 'default'),
                $this->translator->trans('calendar.weekdays.wednesday', [], 'default'),
                $this->translator->trans('calendar.weekdays.thursday', [], 'default'),
                $this->translator->trans('calendar.weekdays.friday', [], 'default'),
                $this->translator->trans('calendar.weekdays.saturday', [], 'default'),
                $this->translator->trans('calendar.weekdays.sunday', [], 'default'),
            ];
        }

        return self::$weekDays;
    }
1080743
public function getDays() {
    $query = \Drupal::entityQuery('day');
    $query->condition('league', $this->id());
    $query->sort('id', 'ASC');
    $ids = $query->execute();

    return Day::loadMultiple($ids);
  }
195250
public function getWeekDayNamesNarrow($day = null)
    {
        $calendar = $this->getName();
        // gregorian, generic

        $data = array();
        $calendsFallback = array($calendar, 'gregorian', 'generic');
        foreach ($calendsFallback as $calendar) {
            $data = $this->getRepoReader()->getEntityByPath(
                'dates/calendars/calendar[@type="'.$calendar.'"]/days/dayContext[@type="format"]/dayWidth[@type="abbreviated"]/day'
            );

            if ($data) {
                break;
            }
        }

        $dayOfWeeks = array();
        foreach($data as $d) {
            $dayOfWeeks[$d['type']] = $d['value'];
        }

        $return = ($day == null) ? $dayOfWeeks : false;

        $day = (is_string($day)) ? strtolower($day) : $day;

        if (is_string($day) && isset($dayOfWeeks[$day])) {
            $return = $dayOfWeeks[$day];
        } elseif(is_int($day)) {
            // get with index
            $arrayKeys = array_keys($dayOfWeeks);
            $return    = $dayOfWeeks[$arrayKeys[$day]];
        }

        return $return;
    }
247838
protected function getYesterday() {
        if (!$this->_yesterday) {
            $this->_yesterday = new YesterdayList($this->version, $this->solution['accountSid']);
        }

        return $this->_yesterday;
    }
515040
public static function yesterdayRange()
    {
        $yesterday = date('d') - 1;
        return [
            mktime(0, 0, 0, date('m'), $yesterday, date('Y')),
            mktime(23, 59, 59, date('m'), $yesterday, date('Y'))
        ];
    }
1170525
public function toWeekDays($pattern)
    {
        $weekDays = $this->getWeekDays();

        $formatedDays = [];

        foreach (str_split($pattern) as $key => $day) {
            if (array_key_exists($day, $weekDays) && intval($day) === 1) {
                $formatedDays[] = $weekDays[$key];
            }
        }

        return join(', ', $formatedDays);
    }
713187
public static function lastWeekRange()
    {
        $timestamp = time();
        return [
            strtotime(date('Y-m-d', strtotime("last week Monday", $timestamp))),
            strtotime(date('Y-m-d', strtotime("last week Sunday", $timestamp))) + 24 * 3600 - 1
        ];
    }