startOfYear.php
Table of Contents
Functions
- startOfYear() : DateTimeImmutable
- Returns the first representable instant of the year containing a date.
Functions
startOfYear()
Returns the first representable instant of the year containing a date.
startOfYear(DateTimeInterface $date) : DateTimeImmutable
A new DateTimeImmutable is returned, set to January 1st at 00:00:00.000000 ; the
source date is never modified. The timezone of the returned value is the one carried
by $date.
Parameters
- $date : DateTimeInterface
-
The source date.
Tags
Return values
DateTimeImmutable —A new immutable date, at the start of the same year.