@ThreadSafe public final class DateUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static long |
getEpochValueInSeconds(String epoch)
Returns the string value converted to an epoch seconds.
|
static Calendar |
parseXmlDate(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.
|
public static Calendar parseXmlDate(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 long getEpochValueInSeconds(String epoch)
epoch - the property valueCopyright © 2012–2020 OWASP. All rights reserved.