Package com.azure.android.core.util
Class DateTimeRfc1123
- java.lang.Object
-
- com.azure.android.core.util.DateTimeRfc1123
-
public final class DateTimeRfc1123 extends java.lang.Object
Wrapper 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 boolean
equals(java.lang.Object obj)
org.threeten.bp.OffsetDateTime
getDateTime()
Returns the underlying DateTime.int
hashCode()
static java.lang.String
toRfc1123String(org.threeten.bp.OffsetDateTime dateTime)
Convert thedateTime
to date time string in RFC1123 format.java.lang.String
toString()
-
-
-
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 thedateTime
to 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:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-