Skip to content

Structure

DateInterval

iOS 10.0+ iPadOS 10.0+ Mac Catalyst 10.0+ macOS 10.12+ tvOS 10.0+ watchOS 3.0+
The span of time between a specific start date and end date.
struct DateInterval

Overview

DateInterval represents a closed date interval in the form of [startDate, endDate]. It is possible for the start and end dates to be the same with a duration of 0. DateInterval does not support reverse intervals i.e. intervals where the duration is less than 0 and the end date occurs earlier in time than the start date.

Topics

Operators

Initializers

Instance Properties

Instance Methods

Default Implementations

Relationships

Conforms To

  • Swift.Comparable
  • Swift.Copyable
  • Swift.CustomDebugStringConvertible
  • Swift.CustomReflectable
  • Swift.CustomStringConvertible
  • Swift.Decodable
  • Swift.Encodable
  • Swift.Equatable
  • Swift.Escapable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.SendableMetatype