isToday.php
Table of Contents
Functions
- isToday() : bool
- Tells whether a date falls on the current calendar day.
Functions
isToday()
Tells whether a date falls on the current calendar day.
isToday(DateTimeInterface $date[, DateTimeInterface|null $now = null ][, DateTimeZone|null $timezone = null ]) : bool
A special case of isSameDay( $date , $now ) — see there for the timezone rule : the
comparison is made in $timezone, defaulting to the timezone carried by $date.
Parameters
- $date : DateTimeInterface
-
The date to test.
- $now : DateTimeInterface|null = null
-
The reference "now". Defaults to the current date/time.
- $timezone : DateTimeZone|null = null
-
The timezone the comparison is made in. Defaults to
$date's own timezone.
Tags
Return values
bool —true if $date falls on the same calendar day as $now, false otherwise.