minuteOfDay
minuteOfDay
returns the minutes since the top of the day (midnight) in the specified time zone.
Syntax
minuteOfDay(instant, timeZone, localTime)
minuteOfDay(dateTime, localTime)
minuteOfDay(localTime)
Parameters
Parameter | Type | Description |
---|---|---|
instant | Instant | The date-time from which to return the number of minutes. |
timeZone | ZoneId | The time zone. |
dateTime | ZonedDateTime | The date-time from which to return the number of minutes. |
localTime | boolean | Set this parameter to
|
Returns
Returns an int value of minutes since midnight for a specified date-time.
Examples
datetime = parseInstant("2022-01-01T12:34:56 ET")
minute = minuteOfDay(datetime, timeZone("ET"), false)
println minute
- Log