Class DateUtils


  • public abstract class DateUtils
    extends Object
    Utility methods for handling dates
    Since:
    4.0.0
    Author:
    joseross
    • Constructor Detail

      • DateUtils

        public DateUtils()
    • Method Detail

      • getCurrentTime

        public static ZonedDateTime getCurrentTime()
        Returns the current time in UTC
      • formatCurrentTime

        public static String formatCurrentTime​(DateTimeFormatter formatter)
        Applies the given formatter to the current time in UTC
      • getCurrentTimeIso

        public static String getCurrentTimeIso()
        Returns the current time in UTC formatted using the ISO standard
      • formatCurrentTime

        public static String formatCurrentTime​(String pattern)
        Applies the given pattern to format the current time in UTC