DateTimeRfc1123 Class

  • java.lang.Object
    • com.azure.core.util.DateTimeRfc1123

public final class DateTimeRfc1123

Wrapper over java.time.OffsetDateTime used for specifying RFC1123 format during serialization and deserialization.

Constructor Summary

Constructor Description
DateTimeRfc1123(String formattedString)

Creates a new DateTimeRfc1123 object with the specified DateTime.

DateTimeRfc1123(OffsetDateTime dateTime)

Creates a new DateTimeRfc1123 object with the specified DateTime.

Method Summary

Modifier and Type Method and Description
boolean equals(Object obj)
OffsetDateTime getDateTime()

Returns the underlying DateTime.

int hashCode()
static String toRfc1123String(OffsetDateTime dateTime)

Convert the dateTime to date time string in RFC1123 format.

String toString()

Methods inherited from java.lang.Object

Constructor Details

DateTimeRfc1123

public DateTimeRfc1123(String formattedString)

Creates a new DateTimeRfc1123 object with the specified DateTime.

Parameters:

formattedString - The datetime string in RFC1123 format

DateTimeRfc1123

public DateTimeRfc1123(OffsetDateTime dateTime)

Creates a new DateTimeRfc1123 object with the specified DateTime.

Parameters:

dateTime - The DateTime object to wrap.

Method Details

equals

public boolean equals(Object obj)

Overrides:

DateTimeRfc1123.equals(Object obj)

Parameters:

obj

getDateTime

public OffsetDateTime getDateTime()

Returns the underlying DateTime.

Returns:

The underlying DateTime.

hashCode

public int hashCode()

Overrides:

DateTimeRfc1123.hashCode()

toRfc1123String

public static String toRfc1123String(OffsetDateTime dateTime)

Convert the dateTime to date time string in RFC1123 format.

Parameters:

dateTime - The date time in OffsetDateTime format.

Returns:

The date time string in RFC1123 format.

toString

public String toString()

Overrides:

DateTimeRfc1123.toString()

Applies to