Date

public struct Date : TemporalSpec
extension Temporal.Date: Persistable
extension Temporal.Date: DateUnitOperable
extension Temporal.Date: Codable
extension Temporal.Date: Comparable

Temporal.Date represents a Date with specific allowable formats.

  • .short => yyyy-MM-dd
  • .medium => yyyy-MM-ddZZZZZ
  • .long => yyyy-MM-ddZZZZZ
  • .full => yyyy-MM-ddZZZZZ

Note

.medium, .long, and .full are the same date format.

  • Declaration

    Swift

    public let foundationDate: Foundation.Date
  • Declaration

    Swift

    public let timeZone: TimeZone?
  • Declaration

    Swift

    public static func now() -> Temporal.Date
  • Declaration

    Swift

    public init(_ date: Foundation.Date, timeZone: TimeZone?)