Unreleased APIs from PR #2. Not in 0.2.1. Stable 0.2.1 reference.
LOOM Unreleased (PR #2) / PLOTTING AND CALENDARS
CalendarDay
A date-only Gregorian day with no implicit clock, timezone, or daylight-saving conversion.
Standard inherited Swift protocol operations such as synthesized equality and OptionSet set operations are not repeated. The public declarations below are extracted from the exact source revision listed in the coverage manifest.
Members on this page
Feature guides and release status
CalendarDay
struct CalendarDayConforms to: Swift.Comparable, Swift.Equatable, Swift.Hashable, Swift.Sendable, Swift.SendableMetatype.
A date-only Gregorian day with no implicit clock, timezone, or daylight-saving conversion.
Source · CalendarDate.swift:37year
let year: IntA public field of this type. Its value type and mutability are shown in the declaration.
Source · CalendarDate.swift:38month
let month: IntA public field of this type. Its value type and mutability are shown in the declaration.
Source · CalendarDate.swift:39day
let day: IntA public field of this type. Its value type and mutability are shown in the declaration.
Source · CalendarDate.swift:40init(year:month:day:)
init(year: Int, month: Int, day: Int) throwsCreates a value with the supplied arguments. Default arguments are shown in the declaration.
Parameters (3)
year- Argument type and any default are shown in the declaration; see the behavior notes above.
month- Argument type and any default are shown in the declaration; see the behavior notes above.
day- Argument type and any default are shown in the declaration; see the behavior notes above.
weekday
var weekday: CalendarWeekday { get }A public field of this type. Its value type and mutability are shown in the declaration.
Source · CalendarDate.swift:54<(_:_:)
static func < (lhs: CalendarDay, rhs: CalendarDay) -> BoolOrders validated Gregorian dates chronologically by year, month, and day.
Parameters (2)
lhs- Argument type and any default are shown in the declaration; see the behavior notes above.
rhs- Argument type and any default are shown in the declaration; see the behavior notes above.
Returns Bool.
adding(days:)
func adding(days: Int) -> CalendarDay?Adds whole calendar days; returns nil outside years 1...9999 or on integer overflow.
Parameters (1)
days- Argument type and any default are shown in the declaration; see the behavior notes above.
Returns CalendarDay?.