addDays.php
Table of Contents
Functions
- addDays() : DateTimeImmutable
- Returns a copy of a date shifted by a number of days.
Functions
addDays()
Returns a copy of a date shifted by a number of days.
addDays(DateTimeInterface $date, int $days) : DateTimeImmutable
A new DateTimeImmutable is returned ; the source date is never modified. A negative
$days shifts the date backwards.
Parameters
- $date : DateTimeInterface
-
The source date.
- $days : int
-
The number of days to add (negative to subtract).
Tags
Return values
DateTimeImmutable —A new immutable date shifted by $days days.