PlainDate represents a date in the Year-Month-Day (YMD) format. It encapsulates the year, month,
and day components, with validation to ensure the date is valid.
- year : Year.Offset
The year component of the date. It is represented as an
Offsettype fromYear. - month : Month.Ordinal
The month component of the date. It is represented as an
Ordinaltype fromMonth. - day : Day.Ordinal
The day component of the date. It is represented as an
Ordinaltype fromDay. Validates the date by ensuring that the year, month, and day form a correct and valid date.
Instances For
Creates a PlainDate by clipping the day to ensure validity. This function forces the date to be
valid by adjusting the day to fit within the valid range to fit the given month and year.
Equations
Instances For
Creates a new PlainDate from year, month, and day components.
Equations
Instances For
Creates a PlainDate from a year and a day ordinal within that year.
Equations
Instances For
Creates a PlainDate from the number of days since the UNIX epoch (January 1st, 1970).
Equations
Instances For
Returns the unaligned week of the month for a PlainDate (day divided by 7, plus 1).
Equations
Instances For
Adds a given number of months to a PlainDate, clipping the day to the last valid day of the month.
Equations
Instances For
Subtracts Month.Offset from a PlainDate, it clips the day to the last valid day of that month.
Equations
Instances For
Creates a PlainDate by rolling over the extra days to the next month.
Equations
Instances For
Adds a given number of months to a PlainDate, rolling over any excess days into the following month.
Equations
Instances For
Subtracts Month.Offset from a PlainDate, rolling over excess days as needed.
Equations
Instances For
Adds Year.Offset to a PlainDate, rolling over excess days to the next month, or next year.
Equations
Instances For
Subtracts Year.Offset from a PlainDate, rolling over excess days to the next month.
Equations
Instances For
Adds Year.Offset to a PlainDate, clipping the day to the last valid day of the month.
Equations
Instances For
Subtracts Year.Offset from a PlainDate, clipping the day to the last valid day of the month.
Equations
Instances For
Creates a new PlainDate by adjusting the day of the month to the given days value, with any
out-of-range days clipped to the nearest valid date.
Equations
Instances For
Creates a new PlainDate by adjusting the day of the month to the given days value, with any
out-of-range days rolled over to the next month or year as needed.
Equations
Instances For
Calculates the Weekday of a given PlainDate using Zeller's Congruence for the Gregorian calendar.
Equations
Instances For
Determines the week of the month for the given PlainDate. The week of the month is calculated based
on the day of the month and the weekday. Each week starts on Monday because the entire library is
based on the Gregorian Calendar.
Equations
Instances For
Sets the date to the specified desiredWeekday. If the desiredWeekday is the same as the current weekday,
the original date is returned without modification. If the desiredWeekday is in the future, the
function adjusts the date forward to the next occurrence of that weekday.
Equations
Instances For
Calculates the week of the year starting Monday for a given year.