Class DateTimeUtils


  • public class DateTimeUtils
    extends java.lang.Object
    Date and time related utilities.
    • Constructor Summary

      Constructors 
      Constructor Description
      DateTimeUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String readable​(java.time.Instant instant)
      Convert an Instant to a readable format for the system default zone.
      static java.lang.String readable​(java.time.Instant instant, java.time.ZoneId zoneId)
      Convert an Instant to a readable format for a given zone.
      • Methods inherited from class java.lang.Object

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

      • DateTimeUtils

        public DateTimeUtils()
    • Method Detail

      • readable

        public static java.lang.String readable​(java.time.Instant instant)
        Convert an Instant to a readable format for the system default zone.
        Parameters:
        instant - The Instant to convert.
        Returns:
        The readable format in the system default zone.
      • readable

        public static java.lang.String readable​(java.time.Instant instant,
                                                java.time.ZoneId zoneId)
        Convert an Instant to a readable format for a given zone.
        Parameters:
        instant - The Instant to convert.
        zoneId - The ZoneId to apply.
        Returns:
        The readable format in the specified time zone.