startOfMonth.php
Table of Contents
Functions
- startOfMonth() : DateTimeImmutable
- Returns the first representable instant of the month containing a date.
Functions
startOfMonth()
Returns the first representable instant of the month containing a date.
startOfMonth(DateTimeInterface $date) : DateTimeImmutable
A new DateTimeImmutable is returned, set to the 1st of the month 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 month.