Class DateUtil


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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int calculateDays​(long startMs, long endMs)
      Calculate the number of days between start and end dates based on the default timezone.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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