Date.today
Date.today() -> Date
Description
Get the start of the current date as a Date object.
This is the same as Date.now
, but with time set to zero.
$today = Date.today() //= 《 Date 2021-07-03 00:00:00 +0000 》 $tomorrow = $today.add('1 day') //= 《 Date 2021-07-04 00:00:00 +0000 》 $yesterday = $today.add('-1 day') //= 《 Date 2021-07-02 00:00:00 +0000 》