yesterday.php
Table of Contents
Functions
- yesterday() : DateTimeImmutable
- Returns the start of the day preceding a reference date.
Functions
yesterday()
Returns the start of the day preceding a reference date.
yesterday([DateTimeInterface|null $now = null ]) : DateTimeImmutable
startOfDay( addDays( $now , -1 ) ) — always 00:00:00.000000 on the previous
calendar day, regardless of the time of day $now carries. The timezone of the
returned value is the one carried by $now.
Parameters
- $now : DateTimeInterface|null = null
-
The reference date. Defaults to the current date/time.
Tags
Return values
DateTimeImmutable —The start of the day before $now.