Class DateUtil


  • public final class DateUtil
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String formatUTCDate​(java.util.Date date)
      Format a date as UTC timestamp.
      static java.text.SimpleDateFormat getParser()  
      static java.util.Date now()
      Return the current date "rounded" to UTC precision.
      static java.util.Date parseUTCDate​(java.lang.String dateString)
      Parse a UTC timestamp into a date.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getParser

        public static java.text.SimpleDateFormat getParser()
      • parseUTCDate

        public static java.util.Date parseUTCDate​(java.lang.String dateString)
        Parse a UTC timestamp into a date.
        Parameters:
        dateString - timestamp
        Returns:
        date
      • formatUTCDate

        public static java.lang.String formatUTCDate​(java.util.Date date)
        Format a date as UTC timestamp.
        Parameters:
        date - date
        Returns:
        timestamp
      • now

        public static java.util.Date now()
        Return the current date "rounded" to UTC precision.
        Returns:
        now