Class DateUtil


  • public class DateUtil
    extends Object
    A utility class for working with dates.
    Author:
    Jamal Kaabi-Mofrad
    • Method Detail

      • 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 milliseconds
        endMs - end date in milliseconds
        Returns:
        number days between