Calendar

struct Calendar : Hashable, Equatable, ReferenceConvertible
  • Returns an array of tuples, constituting from <-> to pairs, starting with all of yesterday and the 4 days before, then the 3 weeks before, then the 4 months before. Tuples contain:

    1. start date components
    2. end date components
    3. number of days in period
    4. name of period

    Declaration

    Swift

    public func reverseProgressiveDateComponentsSinceToday() -> [(DateComponents, DateComponents, Int, String)]
  • Returns an array of tuples, constituting from <-> to pairs, of the past 7 days. Tuples contain:

    1. start date components
    2. end date components
    3. number of days in period
    4. name of period

    Declaration

    Swift

    public func pastSevenDays() -> [(DateComponents, DateComponents, Int, String)]