Java Date Time Java Java API
java.time.OffsetDateTime
public int getMinute()
Returns the minute-of-hour field from this OffsetDateTime instance.
package com.logicbig.example.offsetdatetime;import java.time.LocalDateTime;import java.time.OffsetDateTime;import java.time.ZoneOffset;public class GetMinuteExample { public static void main (String... args) { OffsetDateTime d = OffsetDateTime.of(LocalDateTime.of(2010, 10, 3, 11, 43), ZoneOffset.ofHours(-5)); int minute = d.getMinute(); System.out.println(minute); }}
43