Contents

Date.FormatString

A type that represents a fixed date format string using string interpolation.

Declaration

struct FormatString

Overview

Use Date.FormatString with Date.VerbatimFormatStyle or Date.ParseStrategy to create fixed-pattern format strings for dates. You build format strings using string interpolation with date field symbols:

let format: Date.FormatString = "\(year: .defaultDigits)-\(month: .twoDigits)-\(day: .twoDigits)"

Topics

Default Implementations