Skip to content

Structure

Calendar

iOS 8.0+ iPadOS 8.0+ Mac Catalyst 8.0+ macOS 10.10+ tvOS 9.0+ watchOS 2.0+
A definition of the relationships between calendar units and absolute points in time, providing features for calculation and comparison of dates.
struct Calendar

Overview

Calendar encapsulates information about systems of reckoning time in which the beginning, length, and divisions of a year are defined. It provides information about the calendar and support for calendrical computations such as determining the range of a given calendrical unit and adding units to a given absolute time.

Topics

Structures

Operators

Initializers

Instance Properties

Instance Methods

Type Properties

Enumerations

  • enum Component
    An enumeration for the various components of a calendar date.
  • enum Identifier
    An enumeration for the available calendars.
  • enum MatchingPolicy
    A hint to the search algorithm to control the method used for searching for dates.
  • enum RepeatedTimePolicy
    Determines which result to use when a time is repeated on a day in a calendar (for example, during a daylight saving transition when the times between 2:00am and 3:00am may happen twice).
  • enum SearchDirection
    The direction in time to search.

Default Implementations

Relationships

Conforms To

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