Class DateTimes


  • public final class DateTimes
    extends java.lang.Object
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  DateTimes.Iso8601Formatter
      Utilities class for formatting date/time/datetime in java data type to iso8601
      static class  DateTimes.Iso8601Parser
      Utilities class for parsing date/time/datetime in iso8601 to appropriate java data type
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.time.OffsetDateTime from​(@NotNull java.time.Instant instant)  
      static java.time.LocalDateTime fromUTC​(@NotNull java.time.Instant instant)  
      static boolean isRelatedToDateTime​(@NotNull java.lang.Class cls)  
      static java.time.OffsetDateTime now()  
      static long nowMilli()  
      static java.time.LocalDateTime nowUTC()  
      static java.time.ZonedDateTime toUTC​(@NotNull java.time.Instant date)  
      static java.time.ZonedDateTime toUTC​(@NotNull java.time.LocalDateTime time)  
      static java.time.ZonedDateTime toUTC​(@NotNull java.time.LocalDateTime time, @NotNull java.time.ZoneId zoneId)  
      static java.time.ZonedDateTime toUTC​(@NotNull java.time.ZonedDateTime dateTime)  
      static java.time.ZonedDateTime toUTC​(@NotNull java.util.Date date)  
      static java.time.ZonedDateTime toZone​(@NotNull java.time.ZonedDateTime dateTime, @NotNull java.time.ZoneId toZone)  
      • Methods inherited from class java.lang.Object

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

      • isRelatedToDateTime

        public static boolean isRelatedToDateTime​(@NotNull
                                                  @NotNull java.lang.Class cls)
      • nowUTC

        public static java.time.LocalDateTime nowUTC()
      • fromUTC

        public static java.time.LocalDateTime fromUTC​(@NotNull
                                                      @NotNull java.time.Instant instant)
      • toUTC

        public static java.time.ZonedDateTime toUTC​(@NotNull
                                                    @NotNull java.util.Date date)
      • toUTC

        public static java.time.ZonedDateTime toUTC​(@NotNull
                                                    @NotNull java.time.Instant date)
      • toUTC

        public static java.time.ZonedDateTime toUTC​(@NotNull
                                                    @NotNull java.time.LocalDateTime time)
      • toUTC

        public static java.time.ZonedDateTime toUTC​(@NotNull
                                                    @NotNull java.time.LocalDateTime time,
                                                    @NotNull
                                                    @NotNull java.time.ZoneId zoneId)
      • toUTC

        public static java.time.ZonedDateTime toUTC​(@NotNull
                                                    @NotNull java.time.ZonedDateTime dateTime)
      • toZone

        public static java.time.ZonedDateTime toZone​(@NotNull
                                                     @NotNull java.time.ZonedDateTime dateTime,
                                                     @NotNull
                                                     @NotNull java.time.ZoneId toZone)
      • now

        public static java.time.OffsetDateTime now()
      • nowMilli

        public static long nowMilli()
      • from

        public static java.time.OffsetDateTime from​(@NotNull
                                                    @NotNull java.time.Instant instant)