Class Java8Rfc3339

    • Constructor Detail

      • Java8Rfc3339

        public Java8Rfc3339()
    • Method Detail

      • formatUtc

        public String formatUtc​(OffsetDateTime date)
        Description copied from interface: Rfc3339Formatter
        Format the Date as a UTC formatted date-time string
        Parameters:
        date - The date to format
        Returns:
        the formatted string
      • isValid

        public boolean isValid​(String dateTime)
        Description copied from interface: Rfc3339Parser
        Check whether the string is a valid date-time according to RFC-3339
        Parameters:
        dateTime - The date-time to validate
        Returns:
        True if valid date-time or null, false otherwise
      • formatUtcMilli

        public String formatUtcMilli​(OffsetDateTime date)
        Description copied from interface: Rfc3339Formatter
        Format the date as a date-time String with millisecond resolution, for example 1999-12-31T16:48:36.123Z
        Parameters:
        date - The date to format
        Returns:
        the formatted string
      • formatUtcMicro

        public String formatUtcMicro​(OffsetDateTime date)
        Description copied from interface: Rfc3339Formatter
        Format the date as a date-time String with microsecond resolution, aka 1999-12-31T16:48:36.123456Z
        Parameters:
        date - The date to format
        Returns:
        the formatted string
      • formatUtcNano

        public String formatUtcNano​(OffsetDateTime date)
        Description copied from interface: Rfc3339Formatter
        Format the date as a date-time String with nanosecond resolution, aka 1999-12-31T16:48:36.123456789Z
        Parameters:
        date - The date to format
        Returns:
        the formatted string
      • formatUtc

        public String formatUtc​(OffsetDateTime date,
                                int fractionDigits)
        Description copied from interface: Rfc3339Formatter
        Format the date as a date-time String with specified resolution, aka 1999-12-31T16:48:36[.123456789]Z
        Parameters:
        date - The date to format
        fractionDigits - The number of fractional digits in the second
        Returns:
        the formatted string
      • format

        public String format​(Date date,
                             String timezone)
        Description copied from interface: Rfc3339Formatter
        Format a date in the given time-zone
        Parameters:
        date - The date to format
        timezone - The time-zone
        Returns:
        the formatted string
      • format

        public String format​(Date date,
                             String timezone,
                             int fractionDigits)
        Description copied from interface: Rfc3339Formatter
        Format the date as a date-time String with specified resolution and time-zone offset, for example 1999-12-31T16:48:36[.123456789]-05:00
        Parameters:
        date - The date to format
        timezone - The time-zone
        fractionDigits - The number of fraction digits
        Returns:
        the formatted string