DateTimeFormatter.BasicIsoDate Property

Definition

The ISO date formatter that formats or parses a date without an offset, such as '20111203'.

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

Property Value

Attributes

Remarks

The ISO date formatter that formats or parses a date without an offset, such as '20111203'.

This returns an immutable formatter capable of formatting and parsing the ISO-8601 basic local date format. The format consists of: <ul> <li>Four digits for the ChronoField#YEAR year. Only years in the range 0000 to 9999 are supported. <li>Two digits for the ChronoField#MONTH_OF_YEAR month-of-year. This is pre-padded by zero to ensure two digits. <li>Two digits for the ChronoField#DAY_OF_MONTH day-of-month. This is pre-padded by zero to ensure two digits. <li>If the offset is not available to format or parse then the format is complete. <li>The ZoneOffset#getId() offset ID without colons. If the offset has seconds then they will be handled even though this is not part of the ISO-8601 standard. The offset parsing is lenient, which allows the minutes and seconds to be optional. Parsing is case insensitive. </ul>

As this formatter has an optional element, it may be necessary to parse using DateTimeFormatter#parseBest.

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#STRICT STRICT resolver style.

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

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