Here you can find the source of getMinuteOfDay(LocalDateTime ldt)
Parameter | Description |
---|---|
ldt | java.time.LocalDateTime source |
public static int getMinuteOfDay(LocalDateTime ldt)
//package com.java2s; //License from project: Open Source License import java.time.LocalDateTime; public class Main { /**/*ww w . j a v a2 s.c o m*/ * Get the minute of the day for a given {@link java.time.LocalDateTime}. For example, * 1:05 AM = 60+5 = 65, 2:10 AM = 120 + 10 = 130, etc. Provides an easy way to sort * {@link java.time.LocalDateTime} objects based on time-of-day, but independent of which * day they occur. * * @param ldt {@link java.time.LocalDateTime} source * @return minute-of-day for given {@link java.time.LocalDateTime} */ public static int getMinuteOfDay(LocalDateTime ldt) { return ((ldt.getHour() * 60) + ldt.getMinute()); } }