JulianCalendar 类

定义

表示儒略历。Represents the Julian calendar.

public ref class JulianCalendar : System::Globalization::Calendar
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public class JulianCalendar : System.Globalization.Calendar
type JulianCalendar = class
    inherit Calendar
Public Class JulianCalendar
Inherits Calendar
继承
JulianCalendar
属性

注解

在45公元前中, 恺凭订购了日历改革, 这将导致日历称为儒略历日历。In 45 B.C., Julius Caesar ordered a calendar reform, which resulted in the calendar called the Julian calendar. 儒略历是公历的前置日历。The Julian calendar is the predecessor of the Gregorian calendar.

备注

有关使用 .NET Framework 中的JulianCalendar类和其他 calendar 类的信息, 请参阅使用日历For information about using the JulianCalendar class and the other calendar classes in the .NET Framework, see Working with Calendars.

JulianCalendar类仅识别当前纪元。The JulianCalendar class recognizes only the current era.

与公历不同, 儒略历将闰年定义为按四整除并且无例外的年份。Unlike the Gregorian calendar, the Julian calendar defines a leap year as a year that is evenly divisible by four with no exceptions. 因此, 日历每128年的某一天不准确。Therefore, the calendar is inaccurate by one day every 128 years. 一个常见年份有365天, 闰年有366天。A common year has 365 days and a leap year has 366 days.

与公历类似, 儒略历包含12个月, 每个月28到31天:1月 (31 天), 二月 (28 或29天), 三月 (31 天), 4 月 (30 天), 5 月 (31 天), 6 月 (30 天), 7 月 (31 天), 8 月 (31 天), 11 月 (30 天), 12 月 (31 天)。Like the Gregorian calendar, the Julian calendar has 12 months with 28 to 31 days each: January (31 days), February (28 or 29 days), March (31 days), April (30 days), May (31 days), June (30 days), July (31 days), August (31 days), September (30 days), October (31 days), November (30 days), and December (31 days). 2月在闰年中有29天, 在常见年份内有28天。February has 29 days during leap years and 28 during common years.

日期公元2001年1月1日The date January 1, 2001 A.D. 在公历中, 相当于公元2000年12月19日in the Gregorian calendar is equivalent to the 19th day of December in the year 2000 A.D. 在儒略历。in the Julian calendar.

目前, JulianCalendar CultureInfo类所支持的任何区域性都不使用。Currently, the JulianCalendar is not used by any of the cultures supported by the CultureInfo class. 因此, JulianCalendar类只能用于计算 Julian 日历中的日期。Therefore, the JulianCalendar class can be used only to calculate dates in the Julian calendar.

CultureInfo个对象都支持一组日历。Each CultureInfo object supports a set of calendars. 属性返回区域性的默认日历, OptionalCalendars属性返回一个数组, 该数组包含该区域性支持的所有日历。 CalendarThe Calendar property returns the default calendar for the culture, and the OptionalCalendars property returns an array containing all the calendars supported by the culture. CultureInfo若要更改使用的日历, 应用程序应Calendar将的属性CultureInfo.DateTimeFormat设置为新Calendar的。To change the calendar used by a CultureInfo, the application should set the Calendar property of CultureInfo.DateTimeFormat to a new Calendar.

构造函数

JulianCalendar()

初始化 JulianCalendar 类的新实例。Initializes a new instance of the JulianCalendar class.

字段

CurrentEra

表示当前日历的当前纪元。Represents the current era of the current calendar. 字段的值为 0。The value of this field is 0.

(继承自 Calendar)
JulianEra

表示当前纪元。Represents the current era. 此字段为常数。This field is constant.

属性

AlgorithmType

获取一个值,该值指示当前日历是阳历、阴历还是二者的组合。Gets a value that indicates whether the current calendar is solar-based, lunar-based, or a combination of both.

DaysInYearBeforeMinSupportedYear

获取 MinSupportedDateTime 属性指定的年份之前的年中天数。Gets the number of days in the year that precedes the year that is specified by the MinSupportedDateTime property.

(继承自 Calendar)
Eras

获取 JulianCalendar 中的纪元列表。Gets the list of eras in the JulianCalendar.

IsReadOnly

获取一个值,该值指示此 Calendar 对象是否为只读。Gets a value indicating whether this Calendar object is read-only.

(继承自 Calendar)
MaxSupportedDateTime

获取 JulianCalendar 类支持的最晚日期和时间。Gets the latest date and time supported by the JulianCalendar class.

MinSupportedDateTime

获取 JulianCalendar 类支持的最早日期和时间。Gets the earliest date and time supported by the JulianCalendar class.

TwoDigitYearMax

获取或设置可以用两位数年份表示的 100 年范围内的最后一年。Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.

方法

AddDays(DateTime, Int32)

返回与指定 DateTime 相距指定天数的 DateTimeReturns a DateTime that is the specified number of days away from the specified DateTime.

(继承自 Calendar)
AddHours(DateTime, Int32)

返回与指定 DateTime 相距指定小时数的 DateTimeReturns a DateTime that is the specified number of hours away from the specified DateTime.

(继承自 Calendar)
AddMilliseconds(DateTime, Double)

返回与指定 DateTime 相距指定毫秒数的 DateTimeReturns a DateTime that is the specified number of milliseconds away from the specified DateTime.

(继承自 Calendar)
AddMinutes(DateTime, Int32)

返回与指定 DateTime 相距指定分钟数的 DateTimeReturns a DateTime that is the specified number of minutes away from the specified DateTime.

(继承自 Calendar)
AddMonths(DateTime, Int32)

返回与指定 DateTime 相距指定月数的 DateTimeReturns a DateTime that is the specified number of months away from the specified DateTime.

AddSeconds(DateTime, Int32)

返回与指定 DateTime 相距指定秒数的 DateTimeReturns a DateTime that is the specified number of seconds away from the specified DateTime.

(继承自 Calendar)
AddWeeks(DateTime, Int32)

返回与指定 DateTime 相距指定周数的 DateTimeReturns a DateTime that is the specified number of weeks away from the specified DateTime.

(继承自 Calendar)
AddYears(DateTime, Int32)

返回与指定 DateTime 相距指定年数的 DateTimeReturns a DateTime that is the specified number of years away from the specified DateTime.

Clone()

创建表示当前 Calendar 对象副本的新对象。Creates a new object that is a copy of the current Calendar object.

(继承自 Calendar)
Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetDayOfMonth(DateTime)

返回指定 DateTime 中的月中日期。Returns the day of the month in the specified DateTime.

GetDayOfWeek(DateTime)

返回指定 DateTime 中的周中日期。Returns the day of the week in the specified DateTime.

GetDayOfYear(DateTime)

返回指定 DateTime 中的日期是该年中的第几天。Returns the day of the year in the specified DateTime.

GetDaysInMonth(Int32, Int32)

返回当前纪元的指定月份和年份中的天数。Returns the number of days in the specified month and year of the current era.

(继承自 Calendar)
GetDaysInMonth(Int32, Int32, Int32)

返回指定纪元中指定年份的指定月份中的天数。Returns the number of days in the specified month in the specified year in the specified era.

GetDaysInYear(Int32)

返回当前纪元中指定年份的天数。Returns the number of days in the specified year of the current era.

(继承自 Calendar)
GetDaysInYear(Int32, Int32)

返回指定纪元中指定年份的天数。Returns the number of days in the specified year in the specified era.

GetEra(DateTime)

返回指定 DateTime 中的纪元。Returns the era in the specified DateTime.

GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetHour(DateTime)

返回指定 DateTime 中的小时值。Returns the hours value in the specified DateTime.

(继承自 Calendar)
GetLeapMonth(Int32)

计算指定年份的闰月。Calculates the leap month for a specified year.

(继承自 Calendar)
GetLeapMonth(Int32, Int32)

计算指定纪元年份的闰月。Calculates the leap month for a specified year and era.

GetMilliseconds(DateTime)

返回指定 DateTime 中的毫秒值。Returns the milliseconds value in the specified DateTime.

(继承自 Calendar)
GetMinute(DateTime)

返回指定 DateTime 中的分钟值。Returns the minutes value in the specified DateTime.

(继承自 Calendar)
GetMonth(DateTime)

返回指定 DateTime 中的月份。Returns the month in the specified DateTime.

GetMonthsInYear(Int32)

返回当前纪元中指定年份的月数。Returns the number of months in the specified year in the current era.

(继承自 Calendar)
GetMonthsInYear(Int32, Int32)

返回指定纪元中指定年份的月数。Returns the number of months in the specified year in the specified era.

GetSecond(DateTime)

返回指定 DateTime 中的秒值。Returns the seconds value in the specified DateTime.

(继承自 Calendar)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
GetWeekOfYear(DateTime, CalendarWeekRule, DayOfWeek)

返回一年中包含指定 DateTime 值中的日期的那个星期。Returns the week of the year that includes the date in the specified DateTime value.

(继承自 Calendar)
GetYear(DateTime)

返回指定 DateTime 中的年份。Returns the year in the specified DateTime.

IsLeapDay(Int32, Int32, Int32)

确定当前纪元中的指定日期是否为闰日。Determines whether the specified date in the current era is a leap day.

(继承自 Calendar)
IsLeapDay(Int32, Int32, Int32, Int32)

确定指定纪元中的指定日期是否为闰日。Determines whether the specified date in the specified era is a leap day.

IsLeapMonth(Int32, Int32)

确定当前纪元中指定年份的指定月份是否为闰月。Determines whether the specified month in the specified year in the current era is a leap month.

(继承自 Calendar)
IsLeapMonth(Int32, Int32, Int32)

确定指定纪元中指定年份的指定月份是否为闰月。Determines whether the specified month in the specified year in the specified era is a leap month.

IsLeapYear(Int32)

确定当前纪元中的指定年份是否为闰年。Determines whether the specified year in the current era is a leap year.

(继承自 Calendar)
IsLeapYear(Int32, Int32)

确定指定纪元中的指定年份是否为闰年。Determines whether the specified year in the specified era is a leap year.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32)

返回设置为当前纪元中指定日期和时间的 DateTimeReturns a DateTime that is set to the specified date and time in the current era.

(继承自 Calendar)
ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32)

返回设置为指定纪元中指定日期和时间的 DateTimeReturns a DateTime that is set to the specified date and time in the specified era.

ToFourDigitYear(Int32)

使用 TwoDigitYearMax 属性将指定的年份转换为四位数年份,以确定相应的纪元。Converts the specified year to a four-digit year by using the TwoDigitYearMax property to determine the appropriate century.

ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅