Cleantime
public struct Cleantime
This is a basic struct that contains the components, but in a simpler, read-only, form.
This is what most clients will use, as it also offers interpretations.
-
The starting date of the period (the cleandate).
Declaration
Swift
public let startDate: Date?
-
The ending date of the period (today, usually).
Declaration
Swift
public let endDate: Date?
-
The total number of days.
Declaration
Swift
public let totalDays: Int
-
The number of years since the clean date.
Declaration
Swift
public let years: Int
-
The number of months since the last year in the clean date.
Declaration
Swift
public let months: Int
-
The number of days since the last month in the clean date.
Declaration
Swift
public let days: Int
-
The total number of months (as opposed to months after the year).
Declaration
Swift
public var totalMonths: Int { get }
-
True, if the date has at least one day.
Declaration
Swift
public var isOneDayOrMore: Bool { get }
-
True, if the date has thirty days or more.
Declaration
Swift
public var isThirtyDaysOrMore: Bool { get }
-
True, if the date has sixty days or more.
Declaration
Swift
public var isSixtyDaysOrMore: Bool { get }
-
True, if the date has niinety days or more.
Declaration
Swift
public var isNinetyDaysOrMore: Bool { get }
-
True, if the date has six months or more.
Declaration
Swift
public var isSixMonthsOrMore: Bool { get }
-
True, if the date has nine months or more.
Declaration
Swift
public var isNineMonthsOrMore: Bool { get }
-
True, if the date has one year or more.
Declaration
Swift
public var isOneYearOrMore: Bool { get }
-
True, if the date has eighteen months or more.
Declaration
Swift
public var isEighteenMonthsOrMore: Bool { get }
-
True, if the date has two years or more.
Declaration
Swift
public var isTwoOrMoreYears: Bool { get }
-
True, if the date has five years or more.
Declaration
Swift
public var isFiveOrMoreYears: Bool { get }
-
True, if the date has ten years or more.
Declaration
Swift
public var isTenOrMoreYears: Bool { get }
-
True, if the date has fifteen years or more.
Declaration
Swift
public var isFifteenOrMoreYears: Bool { get }
-
True, if the date has twenty years or more.
Declaration
Swift
public var isTwentyOrMoreYears: Bool { get }
-
True, if the date has twenty-five years or more.
Declaration
Swift
public var isTwentyFiveOrMoreYears: Bool { get }
-
True, if the date has ten thousand days (27.4 years) or more.
Declaration
Swift
public var isTenThousandDaysOrMore: Bool { get }
-
True, if the date has thirty years or more.
Declaration
Swift
public var isThirtyOrMoreYears: Bool { get }
-
True, if the date has forty years or more.
Declaration
Swift
public var isFortyOrMoreYears: Bool { get }
-
True, if the date has fifty years or more.
Declaration
Swift
public var isFiftyOrMoreYears: Bool { get }
-
Basic initializer. All parameters required.
Declaration
Parameters
startDate
The starting date
endDate
The ending date
totalDays
The total number of days between the two dates (inclusive).
years
The total number of years between the two dates.
months
The number of months, over the years, between the two dates.
days
The number of days, over the months and years, between the two dates.