mscorlib(4.0.0.0) API with additions
Calendar.cs
3 using System.Security;
4 
5 namespace System.Globalization
6 {
9  [ComVisible(true)]
10  [__DynamicallyInvokable]
11  public abstract class Calendar : ICloneable
12  {
13  internal const long TicksPerMillisecond = 10000L;
14 
15  internal const long TicksPerSecond = 10000000L;
16 
17  internal const long TicksPerMinute = 600000000L;
18 
19  internal const long TicksPerHour = 36000000000L;
20 
21  internal const long TicksPerDay = 864000000000L;
22 
23  internal const int MillisPerSecond = 1000;
24 
25  internal const int MillisPerMinute = 60000;
26 
27  internal const int MillisPerHour = 3600000;
28 
29  internal const int MillisPerDay = 86400000;
30 
31  internal const int DaysPerYear = 365;
32 
33  internal const int DaysPer4Years = 1461;
34 
35  internal const int DaysPer100Years = 36524;
36 
37  internal const int DaysPer400Years = 146097;
38 
39  internal const int DaysTo10000 = 3652059;
40 
41  internal const long MaxMillis = 315537897600000L;
42 
43  internal const int CAL_GREGORIAN = 1;
44 
45  internal const int CAL_GREGORIAN_US = 2;
46 
47  internal const int CAL_JAPAN = 3;
48 
49  internal const int CAL_TAIWAN = 4;
50 
51  internal const int CAL_KOREA = 5;
52 
53  internal const int CAL_HIJRI = 6;
54 
55  internal const int CAL_THAI = 7;
56 
57  internal const int CAL_HEBREW = 8;
58 
59  internal const int CAL_GREGORIAN_ME_FRENCH = 9;
60 
61  internal const int CAL_GREGORIAN_ARABIC = 10;
62 
63  internal const int CAL_GREGORIAN_XLIT_ENGLISH = 11;
64 
65  internal const int CAL_GREGORIAN_XLIT_FRENCH = 12;
66 
67  internal const int CAL_JULIAN = 13;
68 
69  internal const int CAL_JAPANESELUNISOLAR = 14;
70 
71  internal const int CAL_CHINESELUNISOLAR = 15;
72 
73  internal const int CAL_SAKA = 16;
74 
75  internal const int CAL_LUNAR_ETO_CHN = 17;
76 
77  internal const int CAL_LUNAR_ETO_KOR = 18;
78 
79  internal const int CAL_LUNAR_ETO_ROKUYOU = 19;
80 
81  internal const int CAL_KOREANLUNISOLAR = 20;
82 
83  internal const int CAL_TAIWANLUNISOLAR = 21;
84 
85  internal const int CAL_PERSIAN = 22;
86 
87  internal const int CAL_UMALQURA = 23;
88 
89  internal int m_currentEraValue = -1;
90 
91  [OptionalField(VersionAdded = 2)]
92  private bool m_isReadOnly;
93 
95  [__DynamicallyInvokable]
96  public const int CurrentEra = 0;
97 
98  internal int twoDigitYearMax = -1;
99 
102  [ComVisible(false)]
103  [__DynamicallyInvokable]
104  public virtual DateTime MinSupportedDateTime
105  {
106  [__DynamicallyInvokable]
107  get
108  {
109  return DateTime.MinValue;
110  }
111  }
112 
115  [ComVisible(false)]
116  [__DynamicallyInvokable]
117  public virtual DateTime MaxSupportedDateTime
118  {
119  [__DynamicallyInvokable]
120  get
121  {
122  return DateTime.MaxValue;
123  }
124  }
125 
126  internal virtual int ID => -1;
127 
128  internal virtual int BaseCalendarID => ID;
129 
132  [ComVisible(false)]
133  public virtual CalendarAlgorithmType AlgorithmType
134  {
135  get
136  {
137  return CalendarAlgorithmType.Unknown;
138  }
139  }
140 
144  [ComVisible(false)]
145  [__DynamicallyInvokable]
146  public bool IsReadOnly
147  {
148  [__DynamicallyInvokable]
149  get
150  {
151  return m_isReadOnly;
152  }
153  }
154 
155  internal virtual int CurrentEraValue
156  {
157  get
158  {
159  if (m_currentEraValue == -1)
160  {
161  m_currentEraValue = CalendarData.GetCalendarData(BaseCalendarID).iCurrentEra;
162  }
163  return m_currentEraValue;
164  }
165  }
166 
169  [__DynamicallyInvokable]
170  public abstract int[] Eras
171  {
172  [__DynamicallyInvokable]
173  get;
174  }
175 
178  protected virtual int DaysInYearBeforeMinSupportedYear => 365;
179 
183  [__DynamicallyInvokable]
184  public virtual int TwoDigitYearMax
185  {
186  [__DynamicallyInvokable]
187  get
188  {
189  return twoDigitYearMax;
190  }
191  [__DynamicallyInvokable]
192  set
193  {
194  VerifyWritable();
195  twoDigitYearMax = value;
196  }
197  }
198 
200  [__DynamicallyInvokable]
201  protected Calendar()
202  {
203  }
204 
207  [ComVisible(false)]
208  public virtual object Clone()
209  {
210  object obj = MemberwiseClone();
211  ((Calendar)obj).SetReadOnlyState(readOnly: false);
212  return obj;
213  }
214 
220  [ComVisible(false)]
221  public static Calendar ReadOnly(Calendar calendar)
222  {
223  if (calendar == null)
224  {
225  throw new ArgumentNullException("calendar");
226  }
227  if (calendar.IsReadOnly)
228  {
229  return calendar;
230  }
231  Calendar calendar2 = (Calendar)calendar.MemberwiseClone();
232  calendar2.SetReadOnlyState(readOnly: true);
233  return calendar2;
234  }
235 
236  internal void VerifyWritable()
237  {
238  if (m_isReadOnly)
239  {
240  throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_ReadOnly"));
241  }
242  }
243 
244  internal void SetReadOnlyState(bool readOnly)
245  {
246  m_isReadOnly = readOnly;
247  }
248 
249  internal static void CheckAddResult(long ticks, DateTime minValue, DateTime maxValue)
250  {
251  if (ticks < minValue.Ticks || ticks > maxValue.Ticks)
252  {
253  throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Environment.GetResourceString("Argument_ResultCalendarRange"), minValue, maxValue));
254  }
255  }
256 
257  internal DateTime Add(DateTime time, double value, int scale)
258  {
259  double num = value * (double)scale + ((value >= 0.0) ? 0.5 : (-0.5));
260  if (!(num > -315537897600000.0) || !(num < 315537897600000.0))
261  {
262  throw new ArgumentOutOfRangeException("value", Environment.GetResourceString("ArgumentOutOfRange_AddValue"));
263  }
264  long num2 = (long)num;
265  long ticks = time.Ticks + num2 * 10000;
266  CheckAddResult(ticks, MinSupportedDateTime, MaxSupportedDateTime);
267  return new DateTime(ticks);
268  }
269 
277  [__DynamicallyInvokable]
278  public virtual DateTime AddMilliseconds(DateTime time, double milliseconds)
279  {
280  return Add(time, milliseconds, 1);
281  }
282 
290  [__DynamicallyInvokable]
291  public virtual DateTime AddDays(DateTime time, int days)
292  {
293  return Add(time, days, 86400000);
294  }
295 
303  [__DynamicallyInvokable]
304  public virtual DateTime AddHours(DateTime time, int hours)
305  {
306  return Add(time, hours, 3600000);
307  }
308 
316  [__DynamicallyInvokable]
317  public virtual DateTime AddMinutes(DateTime time, int minutes)
318  {
319  return Add(time, minutes, 60000);
320  }
321 
329  [__DynamicallyInvokable]
330  public abstract DateTime AddMonths(DateTime time, int months);
331 
339  [__DynamicallyInvokable]
340  public virtual DateTime AddSeconds(DateTime time, int seconds)
341  {
342  return Add(time, seconds, 1000);
343  }
344 
352  [__DynamicallyInvokable]
353  public virtual DateTime AddWeeks(DateTime time, int weeks)
354  {
355  return AddDays(time, weeks * 7);
356  }
357 
365  [__DynamicallyInvokable]
366  public abstract DateTime AddYears(DateTime time, int years);
367 
371  [__DynamicallyInvokable]
372  public abstract int GetDayOfMonth(DateTime time);
373 
377  [__DynamicallyInvokable]
378  public abstract DayOfWeek GetDayOfWeek(DateTime time);
379 
383  [__DynamicallyInvokable]
384  public abstract int GetDayOfYear(DateTime time);
385 
393  [__DynamicallyInvokable]
394  public virtual int GetDaysInMonth(int year, int month)
395  {
396  return GetDaysInMonth(year, month, 0);
397  }
398 
408  [__DynamicallyInvokable]
409  public abstract int GetDaysInMonth(int year, int month, int era);
410 
416  [__DynamicallyInvokable]
417  public virtual int GetDaysInYear(int year)
418  {
419  return GetDaysInYear(year, 0);
420  }
421 
429  [__DynamicallyInvokable]
430  public abstract int GetDaysInYear(int year, int era);
431 
435  [__DynamicallyInvokable]
436  public abstract int GetEra(DateTime time);
437 
441  [__DynamicallyInvokable]
442  public virtual int GetHour(DateTime time)
443  {
444  return (int)(time.Ticks / 36000000000L % 24);
445  }
446 
450  [__DynamicallyInvokable]
451  public virtual double GetMilliseconds(DateTime time)
452  {
453  return time.Ticks / 10000 % 1000;
454  }
455 
459  [__DynamicallyInvokable]
460  public virtual int GetMinute(DateTime time)
461  {
462  return (int)(time.Ticks / 600000000 % 60);
463  }
464 
468  [__DynamicallyInvokable]
469  public abstract int GetMonth(DateTime time);
470 
476  [__DynamicallyInvokable]
477  public virtual int GetMonthsInYear(int year)
478  {
479  return GetMonthsInYear(year, 0);
480  }
481 
489  [__DynamicallyInvokable]
490  public abstract int GetMonthsInYear(int year, int era);
491 
495  [__DynamicallyInvokable]
496  public virtual int GetSecond(DateTime time)
497  {
498  return (int)(time.Ticks / 10000000 % 60);
499  }
500 
501  internal int GetFirstDayWeekOfYear(DateTime time, int firstDayOfWeek)
502  {
503  int num = GetDayOfYear(time) - 1;
504  int num2 = (int)(GetDayOfWeek(time) - num % 7);
505  int num3 = (num2 - firstDayOfWeek + 14) % 7;
506  return (num + num3) / 7 + 1;
507  }
508 
509  private int GetWeekOfYearFullDays(DateTime time, int firstDayOfWeek, int fullDays)
510  {
511  int num = GetDayOfYear(time) - 1;
512  int num2 = (int)(GetDayOfWeek(time) - num % 7);
513  int num3 = (firstDayOfWeek - num2 + 14) % 7;
514  if (num3 != 0 && num3 >= fullDays)
515  {
516  num3 -= 7;
517  }
518  int num4 = num - num3;
519  if (num4 >= 0)
520  {
521  return num4 / 7 + 1;
522  }
523  if (time <= MinSupportedDateTime.AddDays(num))
524  {
525  return GetWeekOfYearOfMinSupportedDateTime(firstDayOfWeek, fullDays);
526  }
527  return GetWeekOfYearFullDays(time.AddDays(-(num + 1)), firstDayOfWeek, fullDays);
528  }
529 
530  private int GetWeekOfYearOfMinSupportedDateTime(int firstDayOfWeek, int minimumDaysInFirstWeek)
531  {
532  int num = GetDayOfYear(MinSupportedDateTime) - 1;
533  int num2 = (int)(GetDayOfWeek(MinSupportedDateTime) - num % 7);
534  int num3 = (firstDayOfWeek + 7 - num2) % 7;
535  if (num3 == 0 || num3 >= minimumDaysInFirstWeek)
536  {
537  return 1;
538  }
539  int num4 = DaysInYearBeforeMinSupportedYear - 1;
540  int num5 = num2 - 1 - num4 % 7;
541  int num6 = (firstDayOfWeek - num5 + 14) % 7;
542  int num7 = num4 - num6;
543  if (num6 >= minimumDaysInFirstWeek)
544  {
545  num7 += 7;
546  }
547  return num7 / 7 + 1;
548  }
549 
559  [__DynamicallyInvokable]
560  public virtual int GetWeekOfYear(DateTime time, CalendarWeekRule rule, DayOfWeek firstDayOfWeek)
561  {
562  if (firstDayOfWeek < DayOfWeek.Sunday || firstDayOfWeek > DayOfWeek.Saturday)
563  {
564  throw new ArgumentOutOfRangeException("firstDayOfWeek", Environment.GetResourceString("ArgumentOutOfRange_Range", DayOfWeek.Sunday, DayOfWeek.Saturday));
565  }
566  switch (rule)
567  {
568  case CalendarWeekRule.FirstDay:
569  return GetFirstDayWeekOfYear(time, (int)firstDayOfWeek);
570  case CalendarWeekRule.FirstFullWeek:
571  return GetWeekOfYearFullDays(time, (int)firstDayOfWeek, 7);
572  case CalendarWeekRule.FirstFourDayWeek:
573  return GetWeekOfYearFullDays(time, (int)firstDayOfWeek, 4);
574  default:
575  throw new ArgumentOutOfRangeException("rule", Environment.GetResourceString("ArgumentOutOfRange_Range", CalendarWeekRule.FirstDay, CalendarWeekRule.FirstFourDayWeek));
576  }
577  }
578 
582  [__DynamicallyInvokable]
583  public abstract int GetYear(DateTime time);
584 
595  [__DynamicallyInvokable]
596  public virtual bool IsLeapDay(int year, int month, int day)
597  {
598  return IsLeapDay(year, month, day, 0);
599  }
600 
613  [__DynamicallyInvokable]
614  public abstract bool IsLeapDay(int year, int month, int day, int era);
615 
624  [__DynamicallyInvokable]
625  public virtual bool IsLeapMonth(int year, int month)
626  {
627  return IsLeapMonth(year, month, 0);
628  }
629 
640  [__DynamicallyInvokable]
641  public abstract bool IsLeapMonth(int year, int month, int era);
642 
646  [ComVisible(false)]
647  public virtual int GetLeapMonth(int year)
648  {
649  return GetLeapMonth(year, 0);
650  }
651 
656  [ComVisible(false)]
657  [__DynamicallyInvokable]
658  public virtual int GetLeapMonth(int year, int era)
659  {
660  if (!IsLeapYear(year, era))
661  {
662  return 0;
663  }
664  int monthsInYear = GetMonthsInYear(year, era);
665  for (int i = 1; i <= monthsInYear; i++)
666  {
667  if (IsLeapMonth(year, i, era))
668  {
669  return i;
670  }
671  }
672  return 0;
673  }
674 
681  [__DynamicallyInvokable]
682  public virtual bool IsLeapYear(int year)
683  {
684  return IsLeapYear(year, 0);
685  }
686 
695  [__DynamicallyInvokable]
696  public abstract bool IsLeapYear(int year, int era);
697 
715  [__DynamicallyInvokable]
716  public virtual DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond)
717  {
718  return ToDateTime(year, month, day, hour, minute, second, millisecond, 0);
719  }
720 
740  [__DynamicallyInvokable]
741  public abstract DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era);
742 
743  internal virtual bool TryToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era, out DateTime result)
744  {
745  result = DateTime.MinValue;
746  try
747  {
748  result = ToDateTime(year, month, day, hour, minute, second, millisecond, era);
749  return true;
750  }
751  catch (ArgumentException)
752  {
753  return false;
754  }
755  }
756 
757  internal virtual bool IsValidYear(int year, int era)
758  {
759  if (year >= GetYear(MinSupportedDateTime))
760  {
761  return year <= GetYear(MaxSupportedDateTime);
762  }
763  return false;
764  }
765 
766  internal virtual bool IsValidMonth(int year, int month, int era)
767  {
768  if (IsValidYear(year, era) && month >= 1)
769  {
770  return month <= GetMonthsInYear(year, era);
771  }
772  return false;
773  }
774 
775  internal virtual bool IsValidDay(int year, int month, int day, int era)
776  {
777  if (IsValidMonth(year, month, era) && day >= 1)
778  {
779  return day <= GetDaysInMonth(year, month, era);
780  }
781  return false;
782  }
783 
789  [__DynamicallyInvokable]
790  public virtual int ToFourDigitYear(int year)
791  {
792  if (year < 0)
793  {
794  throw new ArgumentOutOfRangeException("year", Environment.GetResourceString("ArgumentOutOfRange_NeedNonNegNum"));
795  }
796  if (year < 100)
797  {
798  return (TwoDigitYearMax / 100 - ((year > TwoDigitYearMax % 100) ? 1 : 0)) * 100 + year;
799  }
800  return year;
801  }
802 
803  internal static long TimeToTicks(int hour, int minute, int second, int millisecond)
804  {
805  if (hour >= 0 && hour < 24 && minute >= 0 && minute < 60 && second >= 0 && second < 60)
806  {
807  if (millisecond < 0 || millisecond >= 1000)
808  {
809  throw new ArgumentOutOfRangeException("millisecond", string.Format(CultureInfo.InvariantCulture, Environment.GetResourceString("ArgumentOutOfRange_Range"), 0, 999));
810  }
811  return TimeSpan.TimeToTicks(hour, minute, second) + (long)millisecond * 10000L;
812  }
813  throw new ArgumentOutOfRangeException(null, Environment.GetResourceString("ArgumentOutOfRange_BadHourMinuteSecond"));
814  }
815 
816  [SecuritySafeCritical]
817  internal static int GetSystemTwoDigitYearSetting(int CalID, int defaultYearValue)
818  {
819  int num = CalendarData.nativeGetTwoDigitYearMax(CalID);
820  if (num < 0)
821  {
822  num = defaultYearValue;
823  }
824  return num;
825  }
826  }
827 }
static CultureInfo InvariantCulture
Gets the T:System.Globalization.CultureInfo object that is culture-independent (invariant).
Definition: CultureInfo.cs:263
abstract int GetYear(DateTime time)
When overridden in a derived class, returns the year in the specified T:System.DateTime.
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
Represents time in divisions, such as weeks, months, and years.
Definition: Calendar.cs:11
virtual DateTime MinSupportedDateTime
Gets the earliest date and time supported by this T:System.Globalization.Calendar object.
Definition: Calendar.cs:105
virtual int GetLeapMonth(int year)
Calculates the leap month for a specified year.
Definition: Calendar.cs:647
static readonly DateTime MinValue
Represents the smallest possible value of T:System.DateTime. This field is read-only.
Definition: DateTime.cs:109
virtual DateTime MaxSupportedDateTime
Gets the latest date and time supported by this T:System.Globalization.Calendar object.
Definition: Calendar.cs:118
Definition: __Canon.cs:3
virtual DateTime AddWeeks(DateTime time, int weeks)
Returns a T:System.DateTime that is the specified number of weeks away from the specified T:System....
Definition: Calendar.cs:353
The exception that is thrown when the value of an argument is outside the allowable range of values a...
abstract DateTime AddMonths(DateTime time, int months)
When overridden in a derived class, returns a T:System.DateTime that is the specified number of month...
Represents an instant in time, typically expressed as a date and time of day. To browse the ....
Definition: DateTime.cs:13
Calendar()
Initializes a new instance of the T:System.Globalization.Calendar class.
Definition: Calendar.cs:201
A type representing a date and time value.
virtual bool IsLeapMonth(int year, int month)
Determines whether the specified month in the specified year in the current era is a leap month.
Definition: Calendar.cs:625
virtual DateTime AddDays(DateTime time, int days)
Returns a T:System.DateTime that is the specified number of days away from the specified T:System....
Definition: Calendar.cs:291
virtual DateTime AddMilliseconds(DateTime time, double milliseconds)
Returns a T:System.DateTime that is the specified number of milliseconds away from the specified T:Sy...
Definition: Calendar.cs:278
Provides information about, and means to manipulate, the current environment and platform....
Definition: Environment.cs:21
const int CurrentEra
Represents the current era of the current calendar.
Definition: Calendar.cs:96
static Calendar ReadOnly(Calendar calendar)
Returns a read-only version of the specified T:System.Globalization.Calendar object.
Definition: Calendar.cs:221
virtual int GetLeapMonth(int year, int era)
Calculates the leap month for a specified year and era.
Definition: Calendar.cs:658
virtual int DaysInYearBeforeMinSupportedYear
Gets the number of days in the year that precedes the year that is specified by the P:System....
Definition: Calendar.cs:178
abstract int GetEra(DateTime time)
When overridden in a derived class, returns the era in the specified T:System.DateTime.
virtual int GetMonthsInYear(int year)
Returns the number of months in the specified year in the current era.
Definition: Calendar.cs:477
DateTime AddDays(double value)
Returns a new T:System.DateTime that adds the specified number of days to the value of this instance.
Definition: DateTime.cs:738
virtual DateTime AddSeconds(DateTime time, int seconds)
Returns a T:System.DateTime that is the specified number of seconds away from the specified T:System....
Definition: Calendar.cs:340
abstract DayOfWeek GetDayOfWeek(DateTime time)
When overridden in a derived class, returns the day of the week in the specified T:System....
static readonly DateTime MaxValue
Represents the largest possible value of T:System.DateTime. This field is read-only.
Definition: DateTime.cs:113
Supports cloning, which creates a new instance of a class with the same value as an existing instance...
Definition: ICloneable.cs:7
Format character that affects the layout of text or the operation of text processes,...
virtual int GetDaysInMonth(int year, int month)
Returns the number of days in the specified month and year of the current era.
Definition: Calendar.cs:394
virtual int TwoDigitYearMax
Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.
Definition: Calendar.cs:185
virtual int GetWeekOfYear(DateTime time, CalendarWeekRule rule, DayOfWeek firstDayOfWeek)
Returns the week of the year that includes the date in the specified T:System.DateTime value.
Definition: Calendar.cs:560
abstract DateTime AddYears(DateTime time, int years)
When overridden in a derived class, returns a T:System.DateTime that is the specified number of years...
virtual DateTime AddHours(DateTime time, int hours)
Returns a T:System.DateTime that is the specified number of hours away from the specified T:System....
Definition: Calendar.cs:304
abstract int GetDayOfMonth(DateTime time)
When overridden in a derived class, returns the day of the month in the specified T:System....
The exception that is thrown when one of the arguments provided to a method is not valid.
virtual double GetMilliseconds(DateTime time)
Returns the milliseconds value in the specified T:System.DateTime.
Definition: Calendar.cs:451
virtual int GetMinute(DateTime time)
Returns the minutes value in the specified T:System.DateTime.
Definition: Calendar.cs:460
CalendarWeekRule
Defines different rules for determining the first week of the year.
CalendarAlgorithmType
Specifies whether a calendar is solar-based, lunar-based, or lunisolar-based.
abstract int [] Eras
When overridden in a derived class, gets the list of eras in the current calendar.
Definition: Calendar.cs:171
abstract int GetDayOfYear(DateTime time)
When overridden in a derived class, returns the day of the year in the specified T:System....
Represents a time interval.To browse the .NET Framework source code for this type,...
Definition: TimeSpan.cs:12
Specifies that the class can be serialized.
virtual bool IsLeapDay(int year, int month, int day)
Determines whether the specified date in the current era is a leap day.
Definition: Calendar.cs:596
The exception that is thrown when a method call is invalid for the object's current state.
virtual bool IsLeapYear(int year)
Determines whether the specified year in the current era is a leap year.
Definition: Calendar.cs:682
Provides information about a specific culture (called a locale for unmanaged code development)....
Definition: CultureInfo.cs:16
virtual int GetHour(DateTime time)
Returns the hours value in the specified T:System.DateTime.
Definition: Calendar.cs:442
virtual CalendarAlgorithmType AlgorithmType
Gets a value indicating whether the current calendar is solar-based, lunar-based, or a combination of...
Definition: Calendar.cs:134
virtual DateTime AddMinutes(DateTime time, int minutes)
Returns a T:System.DateTime that is the specified number of minutes away from the specified T:System....
Definition: Calendar.cs:317
virtual int GetSecond(DateTime time)
Returns the seconds value in the specified T:System.DateTime.
Definition: Calendar.cs:496
abstract int GetMonth(DateTime time)
When overridden in a derived class, returns the month in the specified T:System.DateTime.
DayOfWeek
Specifies the day of the week.
Definition: DayOfWeek.cs:9
virtual DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond)
Returns a T:System.DateTime that is set to the specified date and time in the current era.
Definition: Calendar.cs:716
virtual int ToFourDigitYear(int year)
Converts the specified year to a four-digit year by using the P:System.Globalization....
Definition: Calendar.cs:790
virtual int GetDaysInYear(int year)
Returns the number of days in the specified year of the current era.
Definition: Calendar.cs:417
long Ticks
Gets the number of ticks that represent the date and time of this instance.
Definition: DateTime.cs:315
virtual object Clone()
Creates a new object that is a copy of the current T:System.Globalization.Calendar object.
Definition: Calendar.cs:208
bool IsReadOnly
Gets a value indicating whether this T:System.Globalization.Calendar object is read-only.
Definition: Calendar.cs:147