編集

次の方法で共有


NSIso8601DateFormatOptions Enum

Definition

A flagging enumeration of formatting options for use with NSIso8601DateFormatter.

This enumeration supports a bitwise combination of its member values.

[ObjCRuntime.TV(10, 0)]
[ObjCRuntime.Watch(3, 0)]
[System.Flags]
public enum NSIso8601DateFormatOptions
type NSIso8601DateFormatOptions = 
Inheritance
NSIso8601DateFormatOptions
Attributes

Fields

Name Value Description
Year 1

Includes the year in the string.

Month 2

Includes the month in the string.

WeekOfYear 4

Includes the week of the year in the string (e.g., "W33").

Day 16

Includes the day in the string.

Time 32

Includes the time in the string.

TimeZone 64

Includes the timezone in the string.

SpaceBetweenDateAndTime 128

Puts a space between the date and the time.

DashSeparatorInDate 256

Separates date components with a dash.

FullDate 275

Includes the date in the string.

ColonSeparatorInTime 512

Puts a colon between time components

ColonSeparatorInTimeZone 1024

Puts a colon in the time.

FullTime 1632

Includes the time in the string.

InternetDateTime 1907

The standard ISO-8601 format (yyyy-MM-ddTHH:mm:ssZ).

FractionalSeconds 2048

Remarks

It is often easier to code a format by removing flags from InternetDateTime such as:

fmt.FormatOptions = fmt.FormatOptions & ~NSIso8601DateFormatOptions.Day
var s = fmt.StringFor(d); //"2016-08T23:15:36Z"          

Applies to