Class TimestampUtility


  • public final class TimestampUtility
    extends Object
    • Method Detail

      • getCurrentTimestamp

        public static long getCurrentTimestamp()
      • toUnixTime

        public static long toUnixTime​(long timestamp)
      • getCurrentMonthAtStartOfMonthAndAtStartOfDayTimestampUTC

        public static long getCurrentMonthAtStartOfMonthAndAtStartOfDayTimestampUTC()
      • getCurrentMonthAtStartOfMonthAndAtStartOfDayTimestamp

        public static long getCurrentMonthAtStartOfMonthAndAtStartOfDayTimestamp​(ZoneId zoneId)
      • getPreviousMonthAtStartOfMonthAndAtStartOfDayTimestampUTC

        public static long getPreviousMonthAtStartOfMonthAndAtStartOfDayTimestampUTC()
      • getPreviousMonthAtStartOfMonthAndAtStartOfDayTimestamp

        public static long getPreviousMonthAtStartOfMonthAndAtStartOfDayTimestamp​(ZoneId zoneId)
      • getNMonthAgoAtStartOfMonthAndAtStartOfDayTimestampUTC

        public static long getNMonthAgoAtStartOfMonthAndAtStartOfDayTimestampUTC​(int monthAgo)
      • getNMonthAgoAtStartOfMonthAndAtStartOfDayTimestamp

        public static long getNMonthAgoAtStartOfMonthAndAtStartOfDayTimestamp​(ZoneId zoneId,
                                                                              int monthAgo)
      • isBetween

        public static boolean isBetween​(long timestamp,
                                        long past,
                                        long future)
      • isPast

        public static boolean isPast​(long timestamp)
      • isFuture

        public static boolean isFuture​(long timestamp)
      • isCurrentTimestampNSecondsMore

        public static boolean isCurrentTimestampNSecondsMore​(long timestamp,
                                                             long seconds)