CPCMonth
public struct CPCMonth
Calendar unit that represents a month.
-
Declaration
Swift
public init(containing date: Date, calendar: Calendar)
-
Declaration
Swift
public typealias Element = CPCWeek
-
Value that represents a current month.
Declaration
Swift
public static var current: CPCMonth { get }
-
Value that represents a next month.
Declaration
Swift
public static var next: CPCMonth { get }
-
Value that represents a previous month.
Declaration
Swift
public static var prev: CPCMonth { get }
-
Era of the represented month’s year.
Declaration
Swift
public var era: Int { get }
-
Year of represented month.
Declaration
Swift
public var year: Int { get }
-
Month number of represented month.
Declaration
Swift
public var month: Int { get }
-
Year that contains represented month.
Declaration
Swift
public var containingYear: CPCYear { get }
-
Value that represents a current month in the specified calendar.
Declaration
Swift
public static func current(using calendar: Calendar) -> CPCMonth
Parameters
calendar
Calendar to use.
-
Value that represents next month in the specified calendar.
Declaration
Swift
public static func next(using calendar: Calendar) -> CPCMonth
Parameters
calendar
Calendar to use.
-
Value that represents previous month in the specified calendar.
Declaration
Swift
public static func prev(using calendar: Calendar) -> CPCMonth
Parameters
calendar
Calendar to use.
-
Create a new value, corresponding to a month in the future or past.
Declaration
Swift
public init(monthsSinceNow: Int)
Parameters
monthsSinceNow
Distance from current month in months.