$date->floor()
Rounds the datetime value down to the specified unit
$date->floor('year'|'month'|'day'|'hour'|'minute'|'second' $unit): Date
Parameters
| Name | Type | Default |
|---|---|---|
| $unitrequired | 'year'or'month'or'day'or'hour'or'minute'or'second' |
no default value |
Return type
This method modifies the existing $date object it is applied to and returns it again.
Exceptions
| Type | Description |
|---|---|
Kirby\Exception\InvalidArgumentException |
If the unit name is invalid |