Change the billing cycle anchor on a plan change.

@param  \DateTimeInterface|int|string  $date
@return $this
516903
public function anchorBillingCycleOn($date = 'now')
    {
        if ($date instanceof DateTimeInterface) {
            $date = $date->getTimestamp();
        }

        $this->billingCycleAnchor = $date;

        return $this;
    }
138276
public function setBirthdate($date)
    {
        if ($date instanceof DateTime) {
            $date = $date->format('Y-m-d');
        }

        $this->data->birthDate = $date;

        return $this;
    }
630242
public function withOneTimePayment($value)
    {
        $this->oneTimePayment = $value;
        $this->transactionModifier = TransactionModifier::RECURRING;
        return $this;
    }
369207
public function setByMonthDay($day)
    {
        if (!is_integer($day) || $day > 31 || $day < -31 || $day === 0) {
            throw new InvalidArgumentException('Invalid value for BYMONTHDAY');
        }

        $this->byMonthDay = $day;

        $this->canUseBySetPos = true;

        return $this;
    }
886109
public function setTimeFrom($date)
    {
        $date = static::instance($date);

        $this->setTime($date->hour, $date->minute, $date->second);

        return $this;
    }
152209
public function setDate($date) {
        $dateArray  =   getdate($date);
        $this->date         =   $dateArray[0];            //时间戳
        $this->second       =   $dateArray["seconds"];    //秒
        $this->minute       =   $dateArray["minutes"];    //分
        $this->hour         =   $dateArray["hours"];      //时
        $this->day          =   $dateArray["mday"];       //日
        $this->month        =   $dateArray["mon"];        //月
        $this->year         =   $dateArray["year"];       //年

        $this->weekday      =   $dateArray["wday"];       //星期 0～6
        $this->cWeekday     =   '星期'.$this->Week[$this->weekday];//$dateArray["weekday"];    //星期完整表示
        $this->yDay         =   $dateArray["yday"];       //一年中的天数 0－365
        $this->cMonth       =   $dateArray["month"];      //月份的完整表示

        $this->CDATE        =   $this->format("%Y-%m-%d");//日期表示
        $this->YMD          =   $this->format("%Y%m%d");  //简单日期
        $this->CTIME        =   $this->format("%H:%M:%S");//时间表示

        return ;
    }
1181067
public function date($date)
    {
        $events = $this->repository->findEventsByDate($date);

        if (empty($events)) {
            abort(404);
        }

        return view('cms-frontend::events.date')->with('events', $events);
    }
514512
function setStartDate($date)
    {
        if (!is_object($date) || !is_a($date, 'DateTime')) {
            $date = new DateTime($date, new DateTimeZone(@date_default_timezone_get()));
        }

        $this->startDate = $date->format('D, d M Y H:i:s O');
    }
1147923
public static function freeze($date = null)
    {
        self::$freeze = false;
        self::$freezeDate = $date ? new DateTime($date) : self::now();
        self::$freeze = true;
    }
372851
public function withExpires(DateTime $date)
    {
        $timezone = new DateTimeZone("PRC");

        $this->withoutHeader('Expires');
        $date->setTimezone($timezone);
        $this->withHeader('Expires', $date->format('D, d M Y H:i:s') . ' GMT');

        $maxAge = $date->getTimestamp() - (new DateTime('now', $timezone))->getTimestamp();
        $this->withMaxAge($maxAge);

        return $this;
    }
727746
public function setDatePayment( $date )
	{
		if ( $date === $this->getDatePayment() ) { return; }

		$this->_checkDateFormat($date);

		$this->_values['datepayment'] = (string) $date;
		$this->setModified();
	}
496613
public function setToday(): self
	{
		return $this->modifyClone()->setDate((int) date('Y'), (int) date('m'), (int) date('d'));
	}
457780
public function setDateTimeFrom($date = null)
    {
        $date = $this->resolveCarbon($date);

        return $this->modify($date->rawFormat('Y-m-d H:i:s.u'));
    }
1242056
public static function instance($date)
    {
        if ($date instanceof static) {
            return clone $date;
        }

        static::expectDateTime($date);

        $instance = new static($date->format('Y-m-d H:i:s.u'), $date->getTimezone());

        if ($date instanceof CarbonInterface || $date instanceof Options) {
            $instance->settings($date->getSettings());
        }

        return $instance;
    }
295888
protected static function makeDate($date = null)
    {
        if (is_string($date)) {
            $date = new DateTime($date);
        } elseif (is_numeric($date)) {
            $date = new DateTime('@'.$date);
        }

        return self::isDate($date) ? $date : null;
    }
851598
public function setDay($day)
    {
        if(! in_array($day, $this->weekDays)) {
            throw new InvalidArgumentException('Argument is not a day of the week');
        }
        $this->day = $day;
        return $this;
    }
268729
public function setDateStart( $date )
	{
		if ( $date === $this->getDateStart() ) { return; }

		$this->_checkDateFormat($date);

		$this->_values['start'] = ( $date !== null ? (string) $date : null );
		$this->setModified();
	}