Package org.silverpeas.cmis.util
Class CmisDateConverter
- java.lang.Object
-
- org.silverpeas.cmis.util.CmisDateConverter
-
public class CmisDateConverter extends Object
In CMIS the date and time are expressed in the Gregorian calendar.- Author:
- mmoquillon
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static long
calendarToMillis(GregorianCalendar calendar)
Converts a date in the GregorianCalendar calendar into the number of milliseconds from Epoch.static GregorianCalendar
millisToCalendar(long millis)
Converts milliseconds from Epoch into aGregorianCalendar
object, setting the timezone to GMT and cutting milliseconds off.
-
-
-
Method Detail
-
millisToCalendar
@Nonnull public static GregorianCalendar millisToCalendar(long millis)
Converts milliseconds from Epoch into aGregorianCalendar
object, setting the timezone to GMT and cutting milliseconds off.
-
calendarToMillis
public static long calendarToMillis(@Nonnull GregorianCalendar calendar)
Converts a date in the GregorianCalendar calendar into the number of milliseconds from Epoch.- Parameters:
calendar
- aGregorianCalendar
object.- Returns:
- the number of milliseconds from Epoch.
-
-