Skip to main content
Version: Java (Groovy)

minuteOfHour

minuteOfHour returns the minutes since the top of the hour in the specified time zone.

Syntax

minuteOfHour(instant, timeZone)
minuteOfHour(dateTime)

Parameters

ParameterTypeDescription
instantInstant

The date-time from which to return the number of minutes.

timeZoneZoneId

The time zone.

dateTimeZonedDateTime

The date-time from which to return the number of minutes.

Returns

Returns an int value of minutes since midnight for a specified date-time.

Examples

datetime = parseInstant("2022-01-01T12:34:56 ET")

minute = minuteOfHour(datetime, timeZone("ET"))

println minute