Date

extension Date
  • Undocumented

    See more

    Declaration

    Swift

    public enum DateConversionError : Error
  • Undocumented

    Declaration

    Swift

    public init(iso8601: String) throws
  • Undocumented

    Declaration

    Swift

    public var iso8601: String { get }
  • Undocumented

    Declaration

    Swift

    public func midnight(in timeZone: TimeZone) -> Date
  • Undocumented

    Declaration

    Swift

    public func nextMidnight(in timeZone: TimeZone) -> Date
  • Declaration

    Swift

    public static func durationStringLong(forMinutes minutes: Int) -> String

    Return Value

    ‘1 hour, 10 minutes’

  • Declaration

    Swift

    public static func durationStringMedium(forMinutes minutes: Int) -> String

    Return Value

    ‘1hr 10min’

  • Declaration

    Swift

    public static func durationString(forDays days: Int) -> String

    Return Value

    ‘1day’

  • Declaration

    Swift

    public static func durationString(forHours hours: Int) -> String

    Return Value

    ‘1h’

  • Declaration

    Swift

    public static func durationString(forMinutes minutes: Int) -> String

    Return Value

    ‘1h 10m’

  • Declaration

    Swift

    public static func durationString(forSeconds seconds: TimeInterval) -> String

    Return Value

    ‘60s’

  • Declaration

    Swift

    public static func durationStringShort(forMinutes minutes: Int) -> String

    Return Value

    ‘1:10’

  • Undocumented

    Declaration

    Swift

    public func minutesSince(_ other: Date) -> Int
  • Undocumented

    Declaration

    Swift

    public func durationSince(_ other: Date) -> String
  • Undocumented

    Declaration

    Swift

    public func durationShortSince(_ other: Date) -> String
  • Undocumented

    Declaration

    Swift

    public func durationLongSince(_ other: Date) -> String