public class DateTimeUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.Integer |
computeAge(java.util.Calendar dateOfBirth) |
static long |
getHoursFromLength(long lengthInSeconds)
returns corresponding hours for a HH:MM:SS representation
|
static java.lang.String |
getLengthFormattedAsString(long lengthInSeconds)
format a duration in second using a hh:mm:ss pattern
|
static long |
getLengthFromHMS(int hours,
int min,
int secs)
returns the length in second of a HH:MM:SS representation
|
static long |
getMinutesFromLength(long lengthInSeconds)
returns corresponding minutes for a HH:MM:SS representation
|
static long |
getSecondsFromLength(long lengthInSeconds)
returns corresponding seconds for a HH:MM:SS representation
|
static long |
roundSecondsToMinutes(long lengthInSeconds)
Approximate the length in seconds in minute, round to the closest minute
|
public static java.lang.Integer computeAge(java.util.Calendar dateOfBirth)
public static long getHoursFromLength(long lengthInSeconds)
public static long getMinutesFromLength(long lengthInSeconds)
public static long getSecondsFromLength(long lengthInSeconds)
public static long getLengthFromHMS(int hours, int min, int secs)
public static long roundSecondsToMinutes(long lengthInSeconds)
public static java.lang.String getLengthFormattedAsString(long lengthInSeconds)
Copyright © 2007–2020. All rights reserved.