DayMinus |
Exception | Condition |
---|---|
OverflowException | In the unlikely event of this method requiring a Day with a year less than 1 or greater than 9999. |
This will always return a valid Day, unless it is outside the range allowed by Day (0001-01-01 to 9999-12-31 inclusive), in which case it will throw an OverflowException.
The MonthOfYear of the returned Day will always be the same as that of this Day. However, the DayOfMonth of the returned Day will change if this Day represents February 29th (in a leap year), and the resulting Day does not fall in a leap year. In this unusual situation the DayOfMonth of the returned Day will be 28 instead of 29, to ensure that it represents a valid date on the Gregorian calendar. For example:
Day is immutable, so calling this method will not change this Day.