9 instantiations of GregorianCalendar
PresentationFramework (3)
System\Windows\Controls\DateTimeHelper.cs (2)
13private static System.Globalization.Calendar cal = new GregorianCalendar(); 157dtfi.Calendar = new GregorianCalendar();
System\Windows\Controls\Primitives\CalendarItem.cs (1)
43private System.Globalization.Calendar _calendar = new GregorianCalendar();
System.Private.CoreLib (6)
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.cs (1)
1903return new GregorianCalendar();
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureInfo.cs (4)
790return new GregorianCalendar(); 806CalendarId.GREGORIAN_US or CalendarId.GREGORIAN_ME_FRENCH or CalendarId.GREGORIAN_ARABIC or CalendarId.GREGORIAN_XLIT_ENGLISH or CalendarId.GREGORIAN_XLIT_FRENCH => new GregorianCalendar((GregorianCalendarTypes)calType), 815_ => new GregorianCalendar(), 851return new[] { new GregorianCalendar() };
src\libraries\System.Private.CoreLib\src\System\Globalization\GregorianCalendar.cs (1)
41internal static Calendar GetDefaultInstance() => s_defaultInstance ??= new GregorianCalendar();
54 references to GregorianCalendar
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\DateAndTime.vb (1)
396If TypeOf cal Is GregorianCalendar Then
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
262[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Globalization.GregorianCalendar))]
netstandard (1)
netstandard.cs (1)
832[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Globalization.GregorianCalendar))]
PresentationFramework (6)
System\Windows\Controls\DateTimeHelper.cs (6)
124if (culture.Calendar is GregorianCalendar) 130GregorianCalendar foundCal =null; 135if (cal is GregorianCalendar) 141foundCal = cal as GregorianCalendar; 144if (((GregorianCalendar)cal).CalendarType == GregorianCalendarTypes.Localized) 146foundCal = cal as GregorianCalendar;
System.Globalization.Calendars (1)
System.Globalization.Calendars.cs (1)
6[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Globalization.GregorianCalendar))]
System.Private.CoreLib (43)
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Parser\Utf8Parser.Date.Helpers.cs (2)
148ReadOnlySpan<int> days = DateTime.IsLeapYear(year) ? GregorianCalendar.DaysToMonth366 : GregorianCalendar.DaysToMonth365;
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (2)
1168if (dtfi.Calendar.GetType() != typeof(GregorianCalendar)) 1171dtfi.Calendar = GregorianCalendar.GetDefaultInstance();
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (1)
237: this(CultureInfo.InvariantCulture._cultureData, GregorianCalendar.GetDefaultInstance())
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeParse.cs (8)
3050Calendar calendar = GregorianCalendar.GetDefaultInstance(); 3902cal = GregorianCalendar.GetDefaultInstance(); 3960parseInfo.calendar = GregorianCalendar.GetDefaultInstance(); 3966parseInfo.calendar = GregorianCalendar.GetDefaultInstance(); 3976parseInfo.calendar = GregorianCalendar.GetDefaultInstance(); 3986parseInfo.calendar = GregorianCalendar.GetDefaultInstance(); 3990if (dtfi.Calendar.GetType() != typeof(GregorianCalendar)) 3993dtfi.Calendar = GregorianCalendar.GetDefaultInstance();
src\libraries\System.Private.CoreLib\src\System\Globalization\EastAsianLunisolarCalendar.cs (2)
402return GregorianCalendar.GetDefaultInstance().ToDateTime(gy, gm, gd, hour, minute, second, millisecond); 407Calendar gregorianCalendar = GregorianCalendar.GetDefaultInstance();
src\libraries\System.Private.CoreLib\src\System\Globalization\GregorianCalendarHelper.cs (7)
231ReadOnlySpan<int> daysArray = (y % 4 == 0 && (y % 100 != 0 || y % 400 == 0)) ? GregorianCalendar.DaysToMonth366 : GregorianCalendar.DaysToMonth365; 238long ticks = GregorianCalendar.DateToTicks(y, m, d) + time.TimeOfDay.Ticks; 298ReadOnlySpan<int> days = ((year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)) ? GregorianCalendar.DaysToMonth366 : GregorianCalendar.DaysToMonth365); 470long ticks = GregorianCalendar.DateToTicks(year, month, day) + Calendar.TimeToTicks(hour, minute, second, millisecond); 480return GregorianCalendar.GetDefaultInstance().GetWeekOfYear(time, rule, firstDayOfWeek);
src\libraries\System.Private.CoreLib\src\System\Globalization\HebrewCalendar.cs (2)
466AbsoluteDate = GregorianCalendar.GetAbsoluteDate(gregorianYear, gregorianMonth, gregorianDay); 475long numDays = AbsoluteDate - GregorianCalendar.GetAbsoluteDate(gregorianYear, 1, 1);
src\libraries\System.Private.CoreLib\src\System\Globalization\ISOWeek.cs (1)
5using static System.Globalization.GregorianCalendar;
src\libraries\System.Private.CoreLib\src\System\Globalization\JapaneseCalendar.cs (1)
74new EraInfo(5, 2019, 5, 1, 2018, 1, GregorianCalendar.MaxYear - 2018, "\x4ee4\x548c", "\x4ee4", "R"),
src\libraries\System.Private.CoreLib\src\System\Globalization\JapaneseCalendar.Icu.cs (1)
51int lastMaxYear = GregorianCalendar.MaxYear;
src\libraries\System.Private.CoreLib\src\System\Globalization\JulianCalendar.cs (10)
99ReadOnlySpan<int> days = isLeapYear ? GregorianCalendar.DaysToMonth366 : GregorianCalendar.DaysToMonth365; 146ReadOnlySpan<int> days = leapYear ? GregorianCalendar.DaysToMonth366 : GregorianCalendar.DaysToMonth365; 171ReadOnlySpan<int> days = (year % 4 == 0) ? GregorianCalendar.DaysToMonth366 : GregorianCalendar.DaysToMonth365; 205ReadOnlySpan<int> daysArray = (y % 4 == 0 && (y % 100 != 0 || y % 400 == 0)) ? GregorianCalendar.DaysToMonth366 : GregorianCalendar.DaysToMonth365; 238ReadOnlySpan<int> days = (year % 4 == 0) ? GregorianCalendar.DaysToMonth366 : GregorianCalendar.DaysToMonth365;
src\libraries\System.Private.CoreLib\src\System\Globalization\KoreanCalendar.cs (1)
32new EraInfo(1, 1, 1, 1, -2333, 2334, GregorianCalendar.MaxYear + 2333) // era #, start year/month/day, yearOffset, minEraYear
src\libraries\System.Private.CoreLib\src\System\Globalization\TaiwanCalendar.cs (1)
27new EraInfo(1, 1912, 1, 1, 1911, 1, GregorianCalendar.MaxYear - 1911) // era #, start year/month/day, yearOffset, minEraYear
src\libraries\System.Private.CoreLib\src\System\Globalization\TaiwanLunisolarCalendar.cs (1)
22new EraInfo(1, 1912, 1, 1, 1911, 1, GregorianCalendar.MaxYear - 1911) // era #, start year/month/day, yearOffset, minEraYear
src\libraries\System.Private.CoreLib\src\System\Globalization\ThaiBuddhistCalendar.cs (1)
21new EraInfo(1, 1, 1, 1, -543, 544, GregorianCalendar.MaxYear + 543) // era #, start year/month/day, yearOffset, minEraYear
src\libraries\System.Private.CoreLib\src\System\Globalization\UmAlQuraCalendar.cs (1)
290return GregorianCalendar.GetAbsoluteDate(yg, mg, dg);
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (1)
944ReadOnlySpan<int> days = GregorianCalendar.DaysToMonth365;
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
234[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Globalization.GregorianCalendar))]