Name
Calendar
Synopsis
This abstract class determines the division and measurement
of time in units, such as day, months, years, and eras. It is an abstract
base class for culture-specific calendar implementations included in this
namespace. Derived classes store the specific information about
a calendar’s eras, lengths of years and months, and the sometimes
esoteric rules for calculating leap years. These properties get used
by DateTimeFormatInfo
to properly display a
date and time string from a specific DateTime
value.
public abstract class Calendar { // Protected Constructors protected method Calendar(); // Public Static Fields public const field int CurrentEra; // =0 // Public Instance Properties public abstract field int[] Eras{get; } public virtual field int TwoDigitYearMax{set; get; } // Public Instance Methods public virtual method DateTime AddDays(DateTime time, int days); public virtual method DateTime AddHours(DateTime time, int hours); public virtual method DateTime AddMilliseconds( DateTime time, double milliseconds); public virtual method DateTime AddMinutes(DateTime time, int minutes); public abstract method DateTime AddMonths(DateTime time, int months); public virtual method DateTime AddSeconds(DateTime time, int seconds); public virtual method DateTime AddWeeks(DateTime time, int weeks); public abstract method DateTime AddYears(DateTime time, int years); public abstract method int GetDayOfMonth(DateTime time); public abstract method DayOfWeek GetDayOfWeek( DateTime ...
Get C# in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.