Calendar.GetDaysInYear Method (Int32, Int32)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
When overridden in a derived class, returns the number of days in the specified year and era.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- year
- Type: System.Int32
An integer that represents the year.
- era
- Type: System.Int32
An integer that represents the era.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | year is outside the range supported by the calendar. -or- era is outside the range supported by the calendar. |
For example, in GregorianCalendar, GetDaysInYear returns 365 for a common year or 366 for a leap year.
Notes to InheritorsThe derived class must support CurrentEra when it is passed as the era parameter. One way to support CurrentEra is by replacing it with the value stored in Eras[0], which is the value for the current era of the calendar.