@ThreadSafe
public final class DateUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static long |
getEpochValueInSeconds(java.lang.String epoch)
Returns the string value converted to an epoch seconds.
|
static java.util.Calendar |
parseXmlDate(java.lang.String xsDate)
Parses an XML xs:date into a calendar object.
|
static boolean |
withinDateRange(long date,
long compareTo,
int dayRange)
Determines if the epoch date is within the range specified of the
compareTo epoch time.
|
static boolean |
withinDateRange(java.time.ZonedDateTime date,
java.time.ZonedDateTime compareTo,
int dayRange)
Determines if the date is within the given day range.
|
public static java.util.Calendar parseXmlDate(java.lang.String xsDate)
throws ParseException
xsDate - an xs:date stringParseException - thrown if the date cannot be converted to a
calendarpublic static boolean withinDateRange(long date,
long compareTo,
int dayRange)
date - the date to be checked.compareTo - the date to compare to.dayRange - the range in days to be considered valid.public static boolean withinDateRange(java.time.ZonedDateTime date,
java.time.ZonedDateTime compareTo,
int dayRange)
date - the datecompareTo - the date to compare againstdayRange - the number of days allowedpublic static long getEpochValueInSeconds(java.lang.String epoch)
epoch - the property valueCopyright© 2012-21 Jeremy Long. All Rights Reserved.