addMinutes.php
Table of Contents
Functions
- addMinutes() : DateTimeImmutable
- Returns a copy of a date shifted by a number of minutes.
Functions
addMinutes()
Returns a copy of a date shifted by a number of minutes.
addMinutes(DateTimeInterface $date, int $minutes) : DateTimeImmutable
A new DateTimeImmutable is returned ; the source date is never modified. This is
absolute-duration (elapsed-time) arithmetic : across a DST transition, addMinutes()
shifts by exactly that many real minutes, which can land on a different wall-clock
time than a calendar shift of the same nominal span (see addDays()). A negative
$minutes shifts the date backwards.
Parameters
- $date : DateTimeInterface
-
The source date.
- $minutes : int
-
The number of minutes to add (negative to subtract).
Tags
Return values
DateTimeImmutable —A new immutable date shifted by $minutes minutes.