Package com.ethlo.time
Interface Rfc3339Formatter
-
- All Known Subinterfaces:
Rfc3339
- All Known Implementing Classes:
AbstractRfc3339,EthloITU,Java8Rfc3339
public interface Rfc3339Formatter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Stringformat(Date date, String timezone)Format a date in the given time-zoneStringformat(Date date, String timezone, int fractionDigits)Format the date as a date-time String with specified resolution and time-zone offset, for example 1999-12-31T16:48:36[.123456789]-05:00StringformatUtc(OffsetDateTime date)Format theDateas a UTC formatted date-time stringStringformatUtc(OffsetDateTime date, int fractionDigits)Format the date as a date-time String with specified resolution, aka 1999-12-31T16:48:36[.123456789]ZStringformatUtc(Date date)StringformatUtcMicro(OffsetDateTime date)Format the date as a date-time String with microsecond resolution, aka 1999-12-31T16:48:36.123456ZStringformatUtcMilli(OffsetDateTime date)Format the date as a date-time String with millisecond resolution, for example 1999-12-31T16:48:36.123ZStringformatUtcMilli(Date date)StringformatUtcNano(OffsetDateTime date)Format the date as a date-time String with nanosecond resolution, aka 1999-12-31T16:48:36.123456789Z
-
-
-
Method Detail
-
formatUtc
String formatUtc(OffsetDateTime date)
Format theDateas a UTC formatted date-time string- Parameters:
date- The date to format- Returns:
- the formatted string
-
formatUtc
String formatUtc(Date date)
- Parameters:
date- The date to format- Returns:
- The formatted string
-
formatUtcMilli
String formatUtcMilli(Date date)
- Parameters:
date- The date to format- Returns:
- The formatted string
-
format
String format(Date date, String timezone)
Format a date in the given time-zone- Parameters:
date- The date to formattimezone- The time-zone- Returns:
- the formatted string
-
format
String format(Date date, String timezone, int fractionDigits)
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 formattimezone- The time-zonefractionDigits- The number of fraction digits- Returns:
- the formatted string
-
formatUtcMilli
String formatUtcMilli(OffsetDateTime date)
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
String formatUtcMicro(OffsetDateTime date)
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
String formatUtcNano(OffsetDateTime date)
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
String formatUtc(OffsetDateTime date, int fractionDigits)
Format the date as a date-time String with specified resolution, aka 1999-12-31T16:48:36[.123456789]Z- Parameters:
date- The date to formatfractionDigits- The number of fractional digits in the second- Returns:
- the formatted string
-
-