$date->ceil()
Rounds the datetime value up to next value of the specified unit
$date->ceil(string $unit): Kirby\Toolkit\Date
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $unit * | string |
– | year, month, day, hour, minute or second |
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 |