Class DateUtils

  • All Implemented Interfaces:

    
    public final class DateUtils
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static Boolean after(Date $self, Date that) Tests if this date is after that date.
      final static Date max(Date dateA, Date dateB) Returns the greater of two dates.
      final static Date min(Date dateA, Date dateB) Returns the minimum of two dates.
      final static Date maxOf(Date dates) Returns the maximum of the given dates.
      final static Date minOf(Date dates) Returns the minimum of the given dates.
      final static TimeDuration diff(Date $self, Long otherTime) Returns difference between this date and the otherTime in TimeDuration.
      final static TimeDuration diff(Date $self, Date that) Returns difference between this date and that date in TimeDuration.
      final static Boolean isWithinDurationFromNow(Date $self, TimeDuration duration, Function0<Long> now) Returns true if the date is within the specified duration from now.
      final static Date truncateFuture(Date $self, Function0<Long> now) Truncates the date to the current time if it's in the future.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait