Package org.forgerock.json.jose.utils
Class IntDate
java.lang.Object
org.forgerock.json.jose.utils.IntDate
This class provides utility methods for converting Java Date objects into and from IntDates.
 
Where an IntDate is a JSON numeric value representing the number of seconds from 1970-01-01T0:0:0Z UTC until the specified UTC date/time.
- Since:
 - 2.0.0
 - See Also:
 
- 
Method Summary
Modifier and TypeMethodDescriptionstatic DatefromIntDate(long intDate) Converts an IntDate into a Java Date object.static longConverts a Java Date object into an IntDate. 
- 
Method Details
- 
toIntDate
Converts a Java Date object into an IntDate.Note: Precision is lost in this conversion as the milliseconds are dropped as a part of the conversion.
- Parameters:
 date- The Java Date to convert.- Returns:
 - The IntDate representation of the Java Date.
 
 - 
fromIntDate
Converts an IntDate into a Java Date object.Note: Milliseconds are set to zero on the converted Java Date as an IntDate does not hold millisecond information.
- Parameters:
 intDate- The IntDate to convert.- Returns:
 - The Java Date representation of the IntDate.
 
 
 -