次の方法で共有


DateTimeFormatter.Rfc1123DateTime Property

Definition

The RFC-1123 date-time formatter, such as 'Tue, 3 Jun 2008 11:05:30 GMT'.

[Android.Runtime.Register("RFC_1123_DATE_TIME", ApiSince=26)]
public static Java.Time.Format.DateTimeFormatter? Rfc1123DateTime { get; }
[<Android.Runtime.Register("RFC_1123_DATE_TIME", ApiSince=26)>]
static member Rfc1123DateTime : Java.Time.Format.DateTimeFormatter

Property Value

Attributes

Remarks

The RFC-1123 date-time formatter, such as 'Tue, 3 Jun 2008 11:05:30 GMT'.

This returns an immutable formatter capable of formatting and parsing most of the RFC-1123 format. RFC-1123 updates RFC-822 changing the year from two digits to four. This implementation requires a four digit year. This implementation also does not handle North American or military zone names, only 'GMT' and offset amounts.

The format consists of: <ul> <li>If the day-of-week is not available to format or parse then jump to day-of-month. <li>Three letter ChronoField#DAY_OF_WEEK day-of-week in English. <li>A comma <li>A space <li>One or two digits for the ChronoField#DAY_OF_MONTH day-of-month. <li>A space <li>Three letter ChronoField#MONTH_OF_YEAR month-of-year in English. <li>A space <li>Four digits for the ChronoField#YEAR year. Only years in the range 0000 to 9999 are supported. <li>A space <li>Two digits for the ChronoField#HOUR_OF_DAY hour-of-day. This is pre-padded by zero to ensure two digits. <li>A colon <li>Two digits for the ChronoField#MINUTE_OF_HOUR minute-of-hour. This is pre-padded by zero to ensure two digits. <li>If the second-of-minute is not available then jump to the next space. <li>A colon <li>Two digits for the ChronoField#SECOND_OF_MINUTE second-of-minute. This is pre-padded by zero to ensure two digits. <li>A space <li>The ZoneOffset#getId() offset ID without colons or seconds. An offset of zero uses "GMT". North American zone names and military zone names are not handled. </ul>

Parsing is case insensitive.

The returned formatter has a chronology of ISO set to ensure dates in other calendar systems are correctly converted. It has no override zone and uses the ResolverStyle#SMART SMART resolver style.

Java documentation for java.time.format.DateTimeFormatter.RFC_1123_DATE_TIME.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to