Class DateUtil


  • public final class DateUtil
    extends Object
    • Method Detail

      • verifyCreated

        public static boolean verifyCreated​(Instant created,
                                            int timeToLive,
                                            int futureTimeToLive)
        Return true if the "Created" value is before the current time minus the timeToLive argument, and if the Created value is not "in the future".
        Parameters:
        timeToLive - the value in seconds for the validity of the Created time
        futureTimeToLive - the value in seconds for the future validity of the Created time
        Returns:
        true if the Date is before (now-timeToLive), false otherwise
      • getDateTimeFormatter

        public static DateTimeFormatter getDateTimeFormatter​(boolean milliseconds)