Package com.azure.android.core.util
Class DateTimeRfc1123
- java.lang.Object
-
- com.azure.android.core.util.DateTimeRfc1123
-
public final class DateTimeRfc1123 extends java.lang.ObjectWrapper over org.threeten.bp.OffsetDateTime used for specifying RFC1123 format during serialization and deserialization.
-
-
Constructor Summary
Constructors Constructor Description DateTimeRfc1123(java.lang.String formattedString)Creates a new DateTimeRfc1123 object with the specified DateTime.DateTimeRfc1123(org.threeten.bp.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(java.lang.Object obj)org.threeten.bp.OffsetDateTimegetDateTime()Returns the underlying DateTime.inthashCode()static java.lang.StringtoRfc1123String(org.threeten.bp.OffsetDateTime dateTime)Convert thedateTimeto date time string in RFC1123 format.java.lang.StringtoString()
-
-
-
Constructor Detail
-
DateTimeRfc1123
public DateTimeRfc1123(org.threeten.bp.OffsetDateTime dateTime)
Creates a new DateTimeRfc1123 object with the specified DateTime.- Parameters:
dateTime- The DateTime object to wrap.
-
DateTimeRfc1123
public DateTimeRfc1123(java.lang.String formattedString)
Creates a new DateTimeRfc1123 object with the specified DateTime.- Parameters:
formattedString- The datetime string in RFC1123 format
-
-
Method Detail
-
getDateTime
public org.threeten.bp.OffsetDateTime getDateTime()
Returns the underlying DateTime.- Returns:
- The underlying DateTime.
-
toRfc1123String
public static java.lang.String toRfc1123String(org.threeten.bp.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.
- Throws:
java.lang.IllegalArgumentException- IfOffsetDateTime.getDayOfWeek()orOffsetDateTime.getDayOfMonth()is an unknown value.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-