Package org.alfresco.util
Class DateUtil
java.lang.Object
org.alfresco.util.DateUtil
A utility class for working with dates.
- Author:
- Jamal Kaabi-Mofrad
-
Method Summary
Modifier and TypeMethodDescriptionstatic intcalculateDays(long startMs, long endMs) Calculate the number of days between start and end dates based on the default timezone.static intcalculateMs(long startMs, long endMs) Calculate the number of milliseconds between start and end dates based on the default timezone.
-
Method Details
-
calculateDays
public static int calculateDays(long startMs, long endMs) Calculate the number of days between start and end dates based on the default timezone. If the end date is before the start date, the returned value is negative.- Parameters:
startMs- start date in millisecondsendMs- end date in milliseconds- Returns:
- number days between
-
calculateMs
public static int calculateMs(long startMs, long endMs) Calculate the number of milliseconds between start and end dates based on the default timezone. If the end date is before the start date, the returned value is negative.- Parameters:
startMs- start date in millisecondsendMs- end date in milliseconds- Returns:
- number milliseconds between
-