We need you! We're working hard on the next version of Developer Fusion -
Let us know what you think we should be up to!
-
Expand
Microsoft.Win32
-
Expand
Microsoft.Win32.SafeHandles
-
Expand
System
-
Expand
System.Runtime.Hosting
-
Expand
System.Runtime.InteropServices
-
Expand
System.Runtime.CompilerServices
-
Expand
System.Collections
-
Expand
System.Collections.Generic
-
Expand
System.Collections.ObjectModel
-
Expand
System.Configuration.Assemblies
-
Expand
System.Diagnostics
-
Expand
System.Diagnostics.CodeAnalysis
-
Expand
System.Diagnostics.SymbolStore
-
Expand
System.Globalization
-
Expand
__DateBuffer
-
Expand
BaseInfoTable
-
Expand
BidiCategory
-
Expand
Calendar
-
Expand
CalendarAlgorithmType
-
Expand
CalendarId
-
Expand
CalendarTable
-
Expand
CalendarTableData
-
Expand
CalendarWeekRule
-
Expand
CharUnicodeInfo
-
Expand
ChineseLunisolarCalendar
-
Expand
CodePageDataItem
-
Expand
CompareInfo
-
Expand
CompareOptions
-
Expand
CultureData
-
Expand
CultureFlags
-
Expand
CultureInfo
-
Expand
CultureNameOffsetItem
-
Expand
CultureTable
-
Expand
CultureTableData
-
Expand
CultureTableHeader
-
Expand
CultureTableItem
-
Expand
CultureTableRecord
-
Expand
CultureTypes
-
Expand
DateMapping
-
Expand
DateTimeFormatFlags
-
Expand
DateTimeFormatInfo
-
Expand
DateTimeFormatInfoScanner
-
Expand
DateTimeStyles
-
Expand
DaylightTime
-
Expand
DigitShapes
-
Expand
DigitValues
-
Expand
DTFIUserOverrideValues
-
Expand
EastAsianLunisolarCalendar
-
Expand
EncodingTable
-
Expand
EndianessHeader
-
Expand
EraInfo
-
Expand
ExceptionTableItem
-
Expand
FORMATFLAGS
-
Expand
FoundDatePattern
-
Expand
GlobalizationAssembly
-
Expand
GregorianCalendar
-
Expand
GregorianCalendarHelper
-
Expand
GregorianCalendarTypes
-
Expand
HebrewCalendar
-
Expand
HebrewNumber
-
Expand
HebrewNumberParsingContext
-
Expand
HebrewNumberParsingState
-
Expand
HebrewToken
-
Expand
HebrewValue
-
Expand
HijriCalendar
-
Expand
HS
-
Expand
IdnMapping
-
Expand
IDOffsetItem
-
Expand
IetfNameOffsetItem
-
Expand
InternalCodePageDataItem
-
Expand
InternalEncodingDataItem
-
Expand
JapaneseCalendar
-
Expand
JapaneseLunisolarCalendar
-
Expand
JulianCalendar
-
AddMonths(DateTime, int)
-
AddYears(DateTime, int)
-
AlgorithmType()
-
CheckDayRange(int, int, int)
-
CheckEraRange(int)
-
CheckMonthRange(int)
-
CheckYearEraRange(int, int)
-
DateToTicks(int, int, int)
-
Eras()
-
GetDatePart(long, int)
-
GetDayOfMonth(DateTime)
-
GetDayOfWeek(DateTime)
-
GetDayOfYear(DateTime)
-
GetDaysInMonth(int, int, int)
-
GetDaysInYear(int, int)
-
GetEra(DateTime)
-
GetLeapMonth(int, int)
-
GetMonth(DateTime)
-
GetMonthsInYear(int, int)
-
GetYear(DateTime)
-
ID()
-
IsLeapDay(int, int, int, int)
-
IsLeapMonth(int, int, int)
-
IsLeapYear(int, int)
-
JulianCalendar()
-
MaxSupportedDateTime()
-
MinSupportedDateTime()
-
ToDateTime(int, int, int, int, int, int, int, int)
-
ToFourDigitYear(int)
-
TwoDigitYearMax()
-
Expand
KoreanCalendar
-
Expand
KoreanLunisolarCalendar
-
Expand
MemoryMapFile
-
Expand
MonthNameStyles
-
Expand
NumberFormatInfo
-
Expand
NumberStyles
-
Expand
PersianCalendar
-
Expand
RegionInfo
-
Expand
RegionNameOffsetItem
-
Expand
SortKey
-
Expand
StringInfo
-
Expand
TaiwanCalendar
-
Expand
TaiwanLunisolarCalendar
-
Expand
TextElementEnumerator
-
Expand
TextInfo
-
Expand
TextInfoDataHeader
-
Expand
ThaiBuddhistCalendar
-
Expand
TokenHashValue
-
Expand
UmAlQuraCalendar
-
Expand
UnicodeCategory
-
Expand
UnicodeDataHeader
-
Expand
System.IO
-
Expand
System.IO.IsolatedStorage
-
Expand
System.Reflection
-
Expand
System.Reflection.Cache
-
Expand
System.Reflection.Emit
-
Expand
System.Resources
-
Expand
System.Runtime
-
Expand
System.Runtime.InteropServices.Expando
-
Expand
System.Runtime.ConstrainedExecution
-
Expand
System.Runtime.Remoting.Activation
-
Expand
System.Runtime.Remoting.Messaging
-
Expand
System.Runtime.Remoting.Channels
-
Expand
System.Runtime.Remoting.Lifetime
-
Expand
System.Runtime.Remoting
-
Expand
System.Runtime.Remoting.Contexts
-
Expand
System.Runtime.Remoting.Proxies
-
Expand
System.Runtime.Remoting.Metadata
-
Expand
System.Runtime.Remoting.Metadata.W3cXsd2001
-
Expand
System.Runtime.Remoting.Services
-
Expand
System.Runtime.Serialization
-
Expand
System.Runtime.Serialization.Formatters
-
Expand
System.Runtime.Serialization.Formatters.Binary
-
Expand
System.Runtime.Versioning
-
Expand
System.Security
-
Expand
System.Security.Cryptography
-
Expand
System.Security.Cryptography.X509Certificates
-
Expand
System.Security.Permissions
-
Expand
System.Security.Policy
-
Expand
System.Security.Principal
-
Expand
System.Security.Util
-
Expand
System.Text
-
Expand
System.Threading
-
Expand
System.Runtime.Remoting.Channels.Http
-
Expand
System.Runtime.Remoting.Channels.Tcp
-
Expand
System.Runtime.Remoting.MetadataServices
-
Expand
System.Runtime.Serialization.Formatters.Soap.Xml
-
Expand
System.Runtime.Serialization.Formatters.Soap
-
Expand
Microsoft.Tools.Caspol
-
Expand
Microsoft.Tools.Build
-
Expand
Microsoft.CSharp
-
Expand
System.CodeDom
-
Expand
System.CodeDom.Compiler
-
Expand
System.Collections.Specialized
-
Expand
System.ComponentModel
-
Expand
System.ComponentModel.Design
-
Expand
System.ComponentModel.Design.Serialization
-
Expand
System.Configuration
-
Expand
System.Web
-
Expand
System.Configuration.Provider
-
Expand
System.Configuration.Internal
-
Expand
System.Internal
-
Expand
System.Windows.Forms
-
Expand
System.Net
-
Expand
System.Net.Sockets
-
Expand
System.Net.NetworkInformation
-
Expand
System.Net.ComImports
-
Expand
System.Net.Security
-
Expand
System.Net.Cache
-
Expand
System.Net.Configuration
-
Expand
System.Text.RegularExpressions
-
Expand
System.Tools
-
Expand
System.IO.Compression
-
Expand
System.IO.Ports
-
Expand
System.Security.AccessControl
-
Expand
System.Xml
-
Expand
System.Xml.XPath.DataBinding
-
Expand
System.Xml.Schema
-
Expand
System.Xml.Serialization
-
Expand
System.Xml.Serialization.Advanced
-
Expand
System.Xml.Serialization.Configuration
-
Expand
System.Xml.XPath
-
Expand
System.Xml.Xsl
-
Expand
System.Xml.Xsl.IlGen
-
Expand
System.Xml.Xsl.Qil
-
Expand
System.Xml.Xsl.Runtime
-
Expand
System.Xml.Xsl.XPath
-
Expand
System.Xml.Xsl.Xslt
-
Expand
System.Xml.Xsl.XsltOld
-
Expand
System.Xml.Xsl.XsltOld.Debugger
-
Expand
Microsoft.JScript
-
Expand
Microsoft.Vsa
-
Expand
Microsoft.JScript.Vsa
- namespace System.Globalization
- {
-
- using System;
-
-
-
-
-
-
-
-
-
-
-
- [Serializable()]
- [System.Runtime.InteropServices.ComVisible(true)]
- public class JulianCalendar : Calendar
- {
-
-
- public static readonly int JulianEra = 1;
-
- private const int DatePartYear = 0;
- private const int DatePartDayOfYear = 1;
- private const int DatePartMonth = 2;
- private const int DatePartDay = 3;
-
-
- private const int JulianDaysPerYear = 365;
-
- private const int JulianDaysPer4Years = JulianDaysPerYear * 4 + 1;
-
-
-
- private static readonly int[] DaysToMonth365 = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273,
- 304, 334, 365};
-
- private static readonly int[] DaysToMonth366 = {0, 31, 60, 91, 121, 152, 182, 213, 244, 274,
- 305, 335, 366};
-
-
-
- internal int MaxYear = 9999;
-
-
- [System.Runtime.InteropServices.ComVisible(false)]
- public override DateTime MinSupportedDateTime {
- get { return (DateTime.MinValue); }
- }
-
- [System.Runtime.InteropServices.ComVisible(false)]
- public override DateTime MaxSupportedDateTime {
- get { return (DateTime.MaxValue); }
- }
-
-
-
-
- [System.Runtime.InteropServices.ComVisible(false)]
- public override CalendarAlgorithmType AlgorithmType {
- get { return CalendarAlgorithmType.SolarCalendar; }
- }
-
-
-
-
-
-
- public JulianCalendar()
- {
-
- twoDigitYearMax = 2029;
- }
-
- internal override int ID {
- get { return (CAL_JULIAN); }
- }
-
- internal void CheckEraRange(int era)
- {
- if (era != CurrentEra && era != JulianEra) {
- throw new ArgumentOutOfRangeException("era", Environment.GetResourceString("ArgumentOutOfRange_InvalidEraValue"));
- }
- }
-
- internal void CheckYearEraRange(int year, int era)
- {
- CheckEraRange(era);
- if (year <= 0 || year > MaxYear) {
- throw new ArgumentOutOfRangeException("year", String.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("ArgumentOutOfRange_Range"), 1, MaxYear));
- }
- }
-
- internal void CheckMonthRange(int month)
- {
- if (month < 1 || month > 12) {
- throw new ArgumentOutOfRangeException("month", Environment.GetResourceString("ArgumentOutOfRange_Month"));
- }
- }
-
-
-
- internal void CheckDayRange(int year, int month, int day)
- {
- if (year == 1 && month == 1) {
-
- if (day < 3) {
- throw new ArgumentOutOfRangeException(null, Environment.GetResourceString("ArgumentOutOfRange_BadYearMonthDay"));
- }
- }
- bool isLeapYear = (year % 4) == 0;
- int[] days = isLeapYear ? DaysToMonth366 : DaysToMonth365;
- int monthDays = days[month] - days[month - 1];
- if (day < 1 || day > monthDays) {
- throw new ArgumentOutOfRangeException("day", String.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("ArgumentOutOfRange_Range"), 1, monthDays));
- }
- }
-
-
-
-
- internal int GetDatePart(long ticks, int part)
- {
-
-
- long julianTicks = ticks + TicksPerDay * 2;
-
- int n = (int)(julianTicks / TicksPerDay);
-
- int y4 = n / JulianDaysPer4Years;
-
- n -= y4 * JulianDaysPer4Years;
-
- int y1 = n / JulianDaysPerYear;
-
- if (y1 == 4)
- y1 = 3;
-
- if (part == DatePartYear) {
- return (y4 * 4 + y1 + 1);
- }
-
- n -= y1 * JulianDaysPerYear;
-
- if (part == DatePartDayOfYear) {
- return (n + 1);
- }
-
-
- bool leapYear = (y1 == 3);
- int[] days = leapYear ? DaysToMonth366 : DaysToMonth365;
-
-
- int m = n >> 5 + 1;
-
- while (n >= days[m])
- m++;
-
- if (part == DatePartMonth)
- return (m);
-
- return (n - days[m - 1] + 1);
- }
-
-
- internal long DateToTicks(int year, int month, int day)
- {
- int[] days = (year % 4 == 0) ? DaysToMonth366 : DaysToMonth365;
- int y = year - 1;
- int n = y * 365 + y / 4 + days[month - 1] + day - 1;
-
-
-
- return ((n - 2) * TicksPerDay);
- }
-
-
- public override DateTime AddMonths(DateTime time, int months)
- {
- if (months < -120000 || months > 120000) {
- throw new ArgumentOutOfRangeException("months", String.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("ArgumentOutOfRange_Range"), -120000, 120000));
- }
- int y = GetDatePart(time.Ticks, DatePartYear);
- int m = GetDatePart(time.Ticks, DatePartMonth);
- int d = GetDatePart(time.Ticks, DatePartDay);
- int i = m - 1 + months;
- if (i >= 0) {
- m = i % 12 + 1;
- y = y + i / 12;
- }
- else {
- m = 12 + (i + 1) % 12;
- y = y + (i - 11) / 12;
- }
- int[] daysArray = (y % 4 == 0 && (y % 100 != 0 || y % 400 == 0)) ? DaysToMonth366 : DaysToMonth365;
- int days = (daysArray[m] - daysArray[m - 1]);
-
- if (d > days) {
- d = days;
- }
- long ticks = DateToTicks(y, m, d) + time.Ticks % TicksPerDay;
- Calendar.CheckAddResult(ticks, MinSupportedDateTime, MaxSupportedDateTime);
- return (new DateTime(ticks));
- }
-
-
- public override DateTime AddYears(DateTime time, int years)
- {
- return (AddMonths(time, years * 12));
- }
-
-
- public override int GetDayOfMonth(DateTime time)
- {
- return (GetDatePart(time.Ticks, DatePartDay));
- }
-
-
- public override DayOfWeek GetDayOfWeek(DateTime time)
- {
- return ((DayOfWeek)((int)(time.Ticks / TicksPerDay + 1) % 7));
- }
-
-
- public override int GetDayOfYear(DateTime time)
- {
- return (GetDatePart(time.Ticks, DatePartDayOfYear));
- }
-
-
- public override int GetDaysInMonth(int year, int month, int era)
- {
- CheckYearEraRange(year, era);
- CheckMonthRange(month);
- int[] days = (year % 4 == 0) ? DaysToMonth366 : DaysToMonth365;
- return (days[month] - days[month - 1]);
- }
-
-
- public override int GetDaysInYear(int year, int era)
- {
-
- return (IsLeapYear(year, era) ? 366 : 365);
- }
-
-
- public override int GetEra(DateTime time)
- {
- return (JulianEra);
- }
-
-
- public override int GetMonth(DateTime time)
- {
- return (GetDatePart(time.Ticks, DatePartMonth));
- }
-
-
- public override int[] Eras {
- get { return (new int[] {JulianEra}); }
- }
-
-
- public override int GetMonthsInYear(int year, int era)
- {
- CheckYearEraRange(year, era);
- return (12);
- }
-
-
- public override int GetYear(DateTime time)
- {
- return (GetDatePart(time.Ticks, DatePartYear));
- }
-
-
- public override bool IsLeapDay(int year, int month, int day, int era)
- {
- CheckMonthRange(month);
-
- if (IsLeapYear(year, era)) {
- CheckDayRange(year, month, day);
- return (month == 2 && day == 29);
- }
- CheckDayRange(year, month, day);
- return (false);
- }
-
-
-
-
-
- [System.Runtime.InteropServices.ComVisible(false)]
- public override int GetLeapMonth(int year, int era)
- {
- CheckYearEraRange(year, era);
- return (0);
- }
-
-
- public override bool IsLeapMonth(int year, int month, int era)
- {
- CheckYearEraRange(year, era);
- CheckMonthRange(month);
- return (false);
- }
-
-
-
-
-
- public override bool IsLeapYear(int year, int era)
- {
- CheckYearEraRange(year, era);
- return (year % 4 == 0);
- }
-
-
- public override DateTime ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era)
- {
- CheckYearEraRange(year, era);
- CheckMonthRange(month);
- CheckDayRange(year, month, day);
- if (millisecond < 0 || millisecond >= MillisPerSecond) {
- throw new ArgumentOutOfRangeException("millisecond", String.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("ArgumentOutOfRange_Range"), 0, MillisPerSecond - 1));
- }
-
- if (hour >= 0 && hour < 24 && minute >= 0 && minute < 60 && second >= 0 && second < 60) {
- return new DateTime(DateToTicks(year, month, day) + (new TimeSpan(0, hour, minute, second, millisecond)).Ticks);
- }
- else {
- throw new ArgumentOutOfRangeException(null, Environment.GetResourceString("ArgumentOutOfRange_BadHourMinuteSecond"));
- }
- }
-
-
- public override int TwoDigitYearMax {
- get { return (twoDigitYearMax); }
-
- set {
- VerifyWritable();
- if (value < 99 || value > MaxYear) {
- throw new ArgumentOutOfRangeException("year", String.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("ArgumentOutOfRange_Range"), 99, MaxYear));
-
- }
- twoDigitYearMax = value;
- }
- }
-
-
- public override int ToFourDigitYear(int year)
- {
- if (year > MaxYear) {
- throw new ArgumentOutOfRangeException("year", String.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("ArgumentOutOfRange_Bounds_Lower_Upper"), 1, MaxYear));
- }
- return (base.ToFourDigitYear(year));
- }
- }
-
- }