atMidnight
atMidnight returns an instant for the requested input value at midnight in the specified time zone.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
| instant | Instant | The time to compute the prior midnight for. |
| timeZone | ZoneId | The time zone for which the new value at midnight should be calculated. |
| dateTime | ZonedDateTime | The time to compute the prior midnight for. |
Returns
Returns either an Instant or a ZonedDateTime for the prior midnight in the specified time zone.