public class XMLTimeUtil extends Object
| Constructor and Description |
|---|
XMLTimeUtil() |
| Modifier and Type | Method and Description |
|---|---|
static XMLGregorianCalendar |
add(XMLGregorianCalendar value,
long millis)
Add additional time in miliseconds
|
static String |
getCurrentTimeZoneID() |
static XMLGregorianCalendar |
getIssueInstant()
Get the current instant of time
|
static XMLGregorianCalendar |
getIssueInstant(String timezone)
Returns a XMLGregorianCalendar in the timezone specified.
|
static long |
inMilis(int valueInMins)
Convert the minutes into miliseconds
|
static boolean |
isValid(XMLGregorianCalendar now,
XMLGregorianCalendar notbefore,
XMLGregorianCalendar notOnOrAfter)
Validate that the current time falls between the two boundaries
|
static XMLGregorianCalendar |
parse(String timeString)
Given a string representing xml time, parse into
XMLGregorianCalendar |
static Duration |
parseAsDuration(String timeValue)
Given a string, get the Duration object.
|
static XMLGregorianCalendar |
subtract(XMLGregorianCalendar value,
long millis)
Subtract some miliseconds from the time value
|
public static XMLGregorianCalendar add(XMLGregorianCalendar value, long millis)
value - calendar whose value needs to be updatedmillis - public static XMLGregorianCalendar subtract(XMLGregorianCalendar value, long millis)
value - millis - miliseconds entered in a positive valuepublic static XMLGregorianCalendar getIssueInstant(String timezone)
timezone - public static XMLGregorianCalendar getIssueInstant()
public static String getCurrentTimeZoneID()
public static long inMilis(int valueInMins)
valueInMins - public static boolean isValid(XMLGregorianCalendar now, XMLGregorianCalendar notbefore, XMLGregorianCalendar notOnOrAfter)
now - notbefore - notOnOrAfter - public static Duration parseAsDuration(String timeValue)
timeValue - public static XMLGregorianCalendar parse(String timeString)
XMLGregorianCalendartimeString - Copyright © 2021 JBoss by Red Hat. All rights reserved.