Class GitHubInstant


  • public class GitHubInstant
    extends Object
    Make sure we can represent a GitHub date, they are inconsistent at best. Sometimes the date is represented as a Long, sometimes represented as a String following: DateTimeFormatter.ISO_INSTANT
    • Method Detail

      • create

        public static GitHubInstant create​(@Nonnull
                                           Number inst)
        Creates an instance of this class from a number.
        Parameters:
        inst - a Number
        Returns:
        GitHubDateWrapper
      • create

        public static GitHubInstant create​(@Nonnull
                                           Instant inst)
        Creates an instance of this class from an instant.
        Parameters:
        inst - an Instant
        Returns:
        GitHubDateWrapper
      • type

        public Class<?> type()
        Returns the Class type of the contained value.
        Returns:
        a Class.
      • epoch

        public Long epoch()
        Returns the contained value as a unix epoch contained in a Long
        Returns:
        epoch in seconds
      • instant

        public Instant instant()
        Rerturns the contained value as a unix epoch contained in an Instant
        Returns:
        an instant