Package com.azure.core.util
Class DateTimeRfc1123
- java.lang.Object
-
- com.azure.core.util.DateTimeRfc1123
-
public final class DateTimeRfc1123 extends Object
Wrapper over java.time.OffsetDateTime used for specifying RFC1123 format during serialization and deserialization.
-
-
Constructor Summary
Constructors 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)OffsetDateTimegetDateTime()Returns the underlying DateTime.inthashCode()static StringtoRfc1123String(OffsetDateTime dateTime)Convert thedateTimeto date time string in RFC1123 format.StringtoString()
-
-
-
Constructor Detail
-
DateTimeRfc1123
public DateTimeRfc1123(OffsetDateTime dateTime)
Creates a new DateTimeRfc1123 object with the specified DateTime.- Parameters:
dateTime- The DateTime object to wrap.
-
DateTimeRfc1123
public DateTimeRfc1123(String formattedString)
Creates a new DateTimeRfc1123 object with the specified DateTime.- Parameters:
formattedString- The datetime string in RFC1123 format
-
-
Method Detail
-
getDateTime
public OffsetDateTime getDateTime()
Returns the underlying DateTime.- Returns:
- The underlying DateTime.
-
toRfc1123String
public static String toRfc1123String(OffsetDateTime dateTime)
Convert thedateTimeto date time string in RFC1123 format.- Parameters:
dateTime- The date time in OffsetDateTime format.- Returns:
- The date time string in RFC1123 format.
-
-