Gets an offset day
@param int $offsetNumDays
@return Date
962889
public function getOffsetDay($offsetNumDays) {
        return new self(
            mktime(
                0,
                0,
                0,
                date('n', $this->getEpoch()),
                date('j', $this->getEpoch()) + $offsetNumDays,
                date('Y', $this->getEpoch())
            )
        );
    }
538562
public function plusDays(int $days) : ZonedDateTime
    {
        return ZonedDateTime::of($this->localDateTime->plusDays($days), $this->timeZone);
    }
807327
public function get_prev_day($daytimestamp) {
        $date = new \DateTime();
        $date->setTimestamp($daytimestamp);
        $date->modify('-1 day');

        return $date->getTimestamp();
    }
303160
public function offsetGet($offset)
    {
        if (!$this->offsetExists($offset)) {
            throw new InvalidOffsetException('Invalid offset: '.$offset);
        }
        if ($this->isCollection()) {
            return $this->box($this->data[$offset]);
        }

        return $this;
    }
286770
protected function calculateDays($numberOfDays)
    {
        $endDate = Carbon::today();
        $startDate = Carbon::today()->subDays($numberOfDays);

        return [$startDate, $endDate];
    }
364329
public function byDays(int $days): Date
    {
        return $this->dayTo($this->originalDate->day() + $days);
    }
1243932
protected function getDays() {
        if (!$this->_days) {
            $this->_days = new DayList($this->version, $this->solution['resourceType']);
        }

        return $this->_days;
    }
980842
public function get_next_day($daytimestamp) {
        $date = new \DateTime();
        $date->setTimestamp($daytimestamp);
        $date->modify('+1 day');

        return $date->getTimestamp();
    }
345699
public function offsetSet($offset, $value)
    {
        $args = [$offset, $value];
        $methodName = __FUNCTION__;

        return $this->findAndCall($methodName, $args);
    }
1335462
public function addDays($days)
    {
        $time=$this->_time+3600*24*$days;
        $obj=new DateTime($time);
        return $obj;
    }
212012
public function getAiringToday(array $options = [], array $headers = [])
    {
        return $this->getFactory()->createResultCollection(
            $this->getApi()->getAiringToday($options, $headers)
        );
    }
250565
protected static function getDayName($day, $shorten = false, $len = 1, $numeric = false) {
        
        switch (strtolower($day)) {
            case 'sat':
            case 'saturday':
                $name   = static::t('saturday');
                $number = 1;
                break;
            case 'sun':
            case 'sunday':
                $name   = static::t('sunday');
                $number = 2;
                break;
            case 'mon':
            case 'monday':
                $name   = static::t('monday');
                $number = 3;
                break;
            case 'tue':
            case 'tuesday':
                $name   = static::t('tuesday');
                $number = 4;
                break;
            case 'wed':
            case 'wednesday':
                $name   = static::t('wednesday');
                $number = 5;
                break;
            case 'thu':
            case 'thursday':
                $name   = static::t('thursday');
                $number = 6;
                break;
            case 'fri':
            case 'friday':
                $name   = static::t('friday');
                $number = 7;
                break;
            default:
                throw new InvalidArgumentException("'{$day}' is not a week day.");
        }
        
        return ($numeric) ? $number : (($shorten) ? mb_substr($name, 0, $len, 'UTF-8') : $name);
    }
1041875
public static DateTime offsetHour(Date date, int offset) {
		return offset(date, DateField.HOUR_OF_DAY, offset);
	}
1163204
private function getDay($dayNumber)
    {
        return isset($this->days[$dayNumber]) ? $this->days[$dayNumber] : null;
    }
1347464
public static final Date getFinishDate(byte[] data, int offset)
   {
      Date result;
      long days = getShort(data, offset);

      if (days == 0x8000)
      {
         result = null;
      }
      else
      {
         result = DateHelper.getDateFromLong(EPOCH + ((days - 1) * DateHelper.MS_PER_DAY));
      }

      return (result);
   }
1166740
@Override
    public int getOffset(int era, int year, int month, int day, int dayOfWeek, int milliseconds) {
        return javatz.getOffset(era, year, month, day, dayOfWeek, milliseconds);
    }
205738
public function getEntriesFromLastDays($days)
    {
        $from = new DateTime();
        $from->modify('-' . $days . ' days');

        return $this
            ->createQueryBuilder('e')
            ->where('e.createdAt >= :from')
            ->setParameters([
                'from' => $from,
            ])
            ->getQuery()
            ->getResult();
    }