HebrewCalendar HebrewCalendar HebrewCalendar HebrewCalendar Class

定義

代表希伯來曆法。Represents the Hebrew calendar.

public ref class HebrewCalendar : System::Globalization::Calendar
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public class HebrewCalendar : System.Globalization.Calendar
type HebrewCalendar = class
    inherit Calendar
Public Class HebrewCalendar
Inherits Calendar
繼承
HebrewCalendarHebrewCalendarHebrewCalendarHebrewCalendar
屬性

範例

下列範例會建立一個檔案, 其中包含HebrewCalendar類別所支援的日期範圍, 並顯示5772年每個月的天數。The following example creates a file that contains the date ranges supported by the HebrewCalendar class, and displays the number of days in each month of the year 5772.

using System;
using System.Globalization;
using System.IO;
using System.Threading;

public class Example
{
   public static void Main()
   {
      StreamWriter output = new StreamWriter("HebrewCalendarInfo.txt");
      
      // Make the Hebrew Calendar the current calendar and
      // Hebrew (Israel) the current thread culture.
      HebrewCalendar hc = new HebrewCalendar();
      CultureInfo culture = CultureInfo.CreateSpecificCulture("he-IL");
      culture.DateTimeFormat.Calendar = hc;
      Thread.CurrentThread.CurrentCulture = culture;
      
      output.WriteLine("{0} Information:\n", 
                       GetCalendarName(culture.DateTimeFormat.Calendar));
      
      // Get the calendar range expressed in both Hebrew calendar and
      // Gregorian calendar dates.
      output.WriteLine("Start Date: {0} ", hc.MinSupportedDateTime);  
      culture.DateTimeFormat.Calendar = culture.Calendar;
      output.WriteLine("            ({0} Gregorian)\n", 
                       hc.MinSupportedDateTime);
      
      culture.DateTimeFormat.Calendar = hc;
      output.WriteLine("End Date: {0} ", hc.MaxSupportedDateTime);
      culture.DateTimeFormat.Calendar = culture.Calendar;
      output.WriteLine("          ({0} Gregorian)\n", 
                       hc.MaxSupportedDateTime);  
      
      culture.DateTimeFormat.Calendar = hc;
      
      // Get the year in the Hebrew calendar that corresponds to 1/1/2012
      // and display information about it.
      DateTime startOfYear = new DateTime(2012, 1, 1);
      output.WriteLine("Days in the Year {0}: {1}\n", 
                       hc.GetYear(startOfYear), 
                       hc.GetDaysInYear(hc.GetYear(startOfYear)));
      
      output.WriteLine("Days in Each Month of {0}:\n", hc.GetYear(startOfYear));
      output.WriteLine("Month       Days       Month Name");
      // Change start of year to first day of first month 
      startOfYear = hc.ToDateTime(hc.GetYear(startOfYear), 1, 1, 0, 0, 0, 0);
      DateTime startOfMonth = startOfYear;
      for (int ctr = 1; ctr <= hc.GetMonthsInYear(hc.GetYear(startOfYear)); ctr++) { 
         output.Write(" {0,2}", ctr);
         output.WriteLine("{0,12}{1,15:MMM}", 
                          hc.GetDaysInMonth(hc.GetYear(startOfMonth), hc.GetMonth(startOfMonth)),
                          startOfMonth);  
         startOfMonth = hc.AddMonths(startOfMonth, 1);                 
      } 
                                     
      output.Close();          
   }

   private static string GetCalendarName(Calendar cal) 
   {
      return cal.ToString().Replace("System.Globalization.", "").Replace("Cal", " Cal");
   }
}
// The example displays the following output:
//       Hebrew Calendar Information:
//       
//       Start Date: ז// טבת שמ"ג 00:00:00 
//                   (01/01/1583 00:00:00 Gregorian)
//       
//       End Date: כ"ט אלול תתקצ"ט 23:59:59 
//                 (29/09/2239 23:59:59 Gregorian)
//       
//       Days in the Year 5772: 354
//       
//       Days in Each Month of 5772:
//       
//       Month       Days       Month Name
//         1          30           תשרי
//         2          29           חשון
//         3          30           כסלו
//         4          29            טבת
//         5          30            שבט
//         6          29            אדר
//         7          30           ניסן
//         8          29           אייר
//         9          30           סיון
//        10          29           תמוז
//        11          30             אב
//        12          29           אלול
Imports System.Globalization
Imports System.IO
Imports System.Threading

Module Example
   Public Sub Main()
      Dim output As New StreamWriter("HebrewCalendarInfo.txt")
      
      ' Make the Hebrew Calendar the current calendar and
      ' Hebrew (Israel) the current thread culture.
      Dim hc As New HebrewCalendar()
      Dim culture As CultureInfo = CultureInfo.CreateSpecificCulture("he-IL")
      culture.DateTimeFormat.Calendar = hc
      Thread.CurrentThread.CurrentCulture = culture
      
      output.WriteLine("{0} Information:", 
                       GetCalendarName(culture.DateTimeFormat.Calendar))
      output.WriteLine()
      
      ' Get the calendar range expressed in both Hebrew calendar and
      ' Gregorian calendar dates.
      output.WriteLine("Start Date: {0} ", 
                       hc.MinSupportedDateTime)  
      culture.DateTimeFormat.Calendar = culture.Calendar
      output.WriteLine("            ({0} Gregorian)", 
                       hc.MinSupportedDateTime)
      output.WriteLine()
      
      culture.DateTimeFormat.Calendar = hc
      output.WriteLine("End Date: {0} ", 
                   hc.MaxSupportedDateTime)
      culture.DateTimeFormat.Calendar = culture.Calendar
      output.WriteLine("          ({0} Gregorian)", 
                       hc.MaxSupportedDateTime)  
      output.WriteLine()
      
      culture.DateTimeFormat.Calendar = hc
      
      ' Get the year in the Hebrew calendar that corresponds to 1/1/2012
      ' and display information about it.
      Dim startOfYear As Date = #1/1/2012#
      output.WriteLine("Days in the Year {0}: {1}", 
                       hc.GetYear(startOfYear), 
                       hc.GetDaysInYear(hc.GetYear(startOfYear)))
      output.WriteLine()
      
      output.WriteLine("Days in Each Month of {0}:", hc.GetYear(startOfYear))
      output.WriteLine()
      output.WriteLine("Month       Days       Month Name")
      ' Change start of year to first day of first month 
      startOfYear = hc.ToDateTime(hc.GetYear(startOfYear), 1, 1, 0, 0, 0, 0)
      Dim startOfMonth As Date = startOfYear
      For ctr As Integer = 1 To hc.GetMonthsInYear(hc.GetYear(startOfYear)) 
         output.Write(" {0,2}", ctr)
         output.WriteLine("{0,12}{1,15:MMM}", 
                          hc.GetDaysInMonth(hc.GetYear(startOfMonth), hc.GetMonth(startOfMonth)),
                          startOfMonth)  
         startOfMonth = hc.AddMonths(startOfMonth, 1)                 
      Next 
                                     
      output.Close()          
   End Sub
   
   Private Function GetCalendarName(cal As Calendar) As String
      Return cal.ToString().Replace("System.Globalization.", "").Replace("Cal", " Cal")
   End Function
End Module
' The example displays the following output:
'       Hebrew Calendar Information:
'       
'       Start Date: ז' טבת שמ"ג 00:00:00 
'                   (01/01/1583 00:00:00 Gregorian)
'       
'       End Date: כ"ט אלול תתקצ"ט 23:59:59 
'                 (29/09/2239 23:59:59 Gregorian)
'       
'       Days in the Year 5772: 354
'       
'       Days in Each Month of 5772:
'       
'       Month       Days       Month Name
'         1          30           תשרי
'         2          29           חשון
'         3          30           כסלו
'         4          29            טבת
'         5          30            שבט
'         6          29            אדר
'         7          30           ניסן
'         8          29           אייר
'         9          30           סיון
'        10          29           תמוז
'        11          30             אב
'        12          29           אלול

此範例會具HebrewCalendar現化物件, 並使其成為希伯來文 (以色列) CultureInfo物件的目前行事曆。The example instantiates a HebrewCalendar object and makes it the current calendar of a Hebrew (Israel) CultureInfo object. 然後, 它會讓希伯來文 (以色列) 成為目前的執行緒文化特性。It then makes Hebrew (Israel) the current thread culture. 這會導致 common language runtime 針對希伯來文行事歷來解讀所有的日期和時間。This causes the common language runtime to interpret all dates and times in relation to the Hebrew calendar.

備註

希伯來文日曆可識別兩個紀元:B.C.E.The Hebrew calendar recognizes two eras: B.C.E. (在一般紀元之前) 和上午(before the common era) and A.M. (拉丁「西元 Mundi」, 這表示「世界年」)。(Latin "Anno Mundi", which means "the year of the world"). HebrewCalendar類別的實會辨識目前的紀元 (A.M.) 和希伯來文年份5343至 5999 (西曆中的1583到 2239)。This implementation of the HebrewCalendar class recognizes only the current era (A.M.) and the Hebrew years 5343 to 5999 (1583 to 2239 in the Gregorian calendar).

注意

如需在 .NET Framework 中HebrewCalendar使用類別和其他行事曆類別的詳細資訊, 請參閱使用行事For information about using the HebrewCalendar class and the other calendar classes in the .NET Framework, see Working with Calendars.

在每隔19年的週期中, 以19個平均整除的年份為結尾, 第三、第6、第3、第11、14、17和19年都是閏年。In every 19-year cycle that ends with a year that is evenly divisible by 19, the 3rd, 6th, 8th, 11th, 14th, 17th, and 19th years are leap years. 根據 Jewish 假日的位置而定, 一般年份可能有353到355天的時間。A common year can have from 353 to 355 days, depending on the placement of Jewish holidays. 閏年可能會有383到385天的時間。A leap year can have from 383 to 385 days.

希伯來文日曆在一般年份期間有12個月, 而在閏年期間有13個月:The Hebrew calendar has 12 months during common years and 13 months during leap years:

GetMonth 值 (一般年份)GetMonth value (common year) GetMonth 值 (閏年)GetMonth value (leap year) 月份Month 一般年份中的天數Days in common years 閏年中的天數Days in leap years
11 11 תשרי (Tishrei)תשרי (Tishrei) 3030 3030
22 22 חשון (Cheshvan)חשון (Cheshvan) 29/3029/30 29/3029/30
33 33 כסלו (Kislev)כסלו (Kislev) 29/3029/30 29/3029/30
44 44 טבת (Tevet)טבת (Tevet) 2929 2929
55 55 שבט (Shevat)שבט (Shevat) 3030 3030
66 - אדר (Adar)אדר (Adar) 2929 -
- 66 אדרא (Adar Alef)אדר א (Adar Alef) - 3030
- 77 אדר ב (Adar Beit)אדר ב (Adar Beit) - 2929
77 88 ניסן (Nissan)ניסן (Nissan) 3030 3030
88 99 אייר (Iyar)אייר (Iyar) 2929 2929
99 1010 סיון (Sivan)סיון (Sivan) 3030 3030
1010 1111 תמוז (Tamuz)תמוז (Tamuz) 2929 2929
1111 1212 אב (Av)אב (Av) 3030 3030
1212 1313 אלול (Elul)אלול (Elul) 2929 2929

Cheshvan 和 Kislev 中的日會根據 Jewish 假日的位置而有所不同。The days in Cheshvan and Kislev vary depending on the placement of Jewish holidays. 在閏年期間, Adar 會由 Adar Alef 取代為30天, 而 Adar Beit 為29天。During leap years, Adar is replaced by Adar Alef with 30 days and Adar Beit with 29 days. Adar 的 Alef 會視為閏月份。Adar Alef is considered the leap month. Adar Alef 的最後一天和 Adar Beit 中的所有天數都會被視為閏日;也就是說, 此IsLeapDay true方法會傳回這幾天的。The last day of Adar Alef and all the days in Adar Beit are considered leap days; that is, the IsLeapDay method returns true for these days.

西元2001年1月1日的日期The date January 1, 2001 A.D. 在西曆中, 相當於5761年中 Tevet 的第六天。in the Gregorian calendar is equivalent to the sixth day of Tevet in the year 5761 A.M. 在希伯來文日曆中。in the Hebrew calendar.

CultureInfo個都支援一組行事曆。Each CultureInfo 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.

建構函式

HebrewCalendar() HebrewCalendar() HebrewCalendar() HebrewCalendar()

初始化 HebrewCalendar 類別的新執行個體。Initializes a new instance of the HebrewCalendar class.

欄位

CurrentEra CurrentEra CurrentEra CurrentEra

表示目前曆法的目前紀元。Represents the current era of the current calendar. 此欄位的值為 0。The value of this field is 0.

(Inherited from Calendar)
HebrewEra HebrewEra HebrewEra HebrewEra

代表目前的紀元。Represents the current era. 這個欄位是常數。This field is constant.

屬性

AlgorithmType AlgorithmType AlgorithmType AlgorithmType

取得值,指出目前的月曆是以陽曆為主、以陰曆為主,還是同時包含兩種曆法。Gets a value that indicates whether the current calendar is solar-based, lunar-based, or a combination of both.

DaysInYearBeforeMinSupportedYear DaysInYearBeforeMinSupportedYear DaysInYearBeforeMinSupportedYear DaysInYearBeforeMinSupportedYear

取得 MinSupportedDateTime 屬性指定之年的前一年的天數。Gets the number of days in the year that precedes the year that is specified by the MinSupportedDateTime property.

(Inherited from Calendar)
Eras Eras Eras Eras

取得 HebrewCalendar 中的紀元清單。Gets the list of eras in the HebrewCalendar.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

取得值,指出 Calendar 物件是否為唯讀。Gets a value indicating whether this Calendar object is read-only.

(Inherited from Calendar)
MaxSupportedDateTime MaxSupportedDateTime MaxSupportedDateTime MaxSupportedDateTime

取得受 HebrewCalendar 型別所支援的最晚日期和時間。Gets the latest date and time supported by the HebrewCalendar type.

MinSupportedDateTime MinSupportedDateTime MinSupportedDateTime MinSupportedDateTime

取得 HebrewCalendar 型別所支援的最早日期和時間。Gets the earliest date and time supported by the HebrewCalendar type.

TwoDigitYearMax TwoDigitYearMax TwoDigitYearMax 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) AddDays(DateTime, Int32) AddDays(DateTime, Int32) AddDays(DateTime, Int32)

傳回與指定 DateTime 相差指定日數的 DateTimeReturns a DateTime that is the specified number of days away from the specified DateTime.

(Inherited from Calendar)
AddHours(DateTime, Int32) AddHours(DateTime, Int32) AddHours(DateTime, Int32) AddHours(DateTime, Int32)

傳回與指定 DateTime 相差指定時數的 DateTimeReturns a DateTime that is the specified number of hours away from the specified DateTime.

(Inherited from Calendar)
AddMilliseconds(DateTime, Double) AddMilliseconds(DateTime, Double) AddMilliseconds(DateTime, Double) AddMilliseconds(DateTime, Double)

傳回與指定 DateTime 相差指定毫秒數的 DateTimeReturns a DateTime that is the specified number of milliseconds away from the specified DateTime.

(Inherited from Calendar)
AddMinutes(DateTime, Int32) AddMinutes(DateTime, Int32) AddMinutes(DateTime, Int32) AddMinutes(DateTime, Int32)

傳回與指定 DateTime 相差指定分鐘數的 DateTimeReturns a DateTime that is the specified number of minutes away from the specified DateTime.

(Inherited from Calendar)
AddMonths(DateTime, Int32) AddMonths(DateTime, Int32) AddMonths(DateTime, Int32) AddMonths(DateTime, Int32)

傳回與指定 DateTime 相差指定月數的 DateTimeReturns a DateTime that is the specified number of months away from the specified DateTime.

AddSeconds(DateTime, Int32) AddSeconds(DateTime, Int32) AddSeconds(DateTime, Int32) AddSeconds(DateTime, Int32)

傳回與指定 DateTime 相差指定秒數的 DateTimeReturns a DateTime that is the specified number of seconds away from the specified DateTime.

(Inherited from Calendar)
AddWeeks(DateTime, Int32) AddWeeks(DateTime, Int32) AddWeeks(DateTime, Int32) AddWeeks(DateTime, Int32)

傳回與指定 DateTime 相差指定週數的 DateTimeReturns a DateTime that is the specified number of weeks away from the specified DateTime.

(Inherited from Calendar)
AddYears(DateTime, Int32) AddYears(DateTime, Int32) AddYears(DateTime, Int32) AddYears(DateTime, Int32)

傳回與指定 DateTime 相差指定年數的 DateTimeReturns a DateTime that is the specified number of years away from the specified DateTime.

Clone() Clone() Clone() Clone()

建立目前 Calendar 物件複本的新物件。Creates a new object that is a copy of the current Calendar object.

(Inherited from Calendar)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetDayOfMonth(DateTime) GetDayOfMonth(DateTime) GetDayOfMonth(DateTime) GetDayOfMonth(DateTime)

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

GetDayOfWeek(DateTime) GetDayOfWeek(DateTime) GetDayOfWeek(DateTime) GetDayOfWeek(DateTime)

傳回指定 DateTime 中的星期。Returns the day of the week in the specified DateTime.

GetDayOfYear(DateTime) GetDayOfYear(DateTime) GetDayOfYear(DateTime) GetDayOfYear(DateTime)

傳回指定之 DateTime 中一年中的日期。Returns the day of the year in the specified DateTime.

GetDaysInMonth(Int32, Int32) GetDaysInMonth(Int32, Int32) GetDaysInMonth(Int32, Int32) GetDaysInMonth(Int32, Int32)

傳回目前紀元之指定月份和年份中的天數。Returns the number of days in the specified month and year of the current era.

(Inherited from Calendar)
GetDaysInMonth(Int32, Int32, Int32) GetDaysInMonth(Int32, Int32, Int32) GetDaysInMonth(Int32, Int32, Int32) GetDaysInMonth(Int32, Int32, Int32)

傳回在指定紀元的指定年份的指定月份中的日數。Returns the number of days in the specified month in the specified year in the specified era.

GetDaysInYear(Int32) GetDaysInYear(Int32) GetDaysInYear(Int32) GetDaysInYear(Int32)

傳回目前紀元之指定年份中的天數。Returns the number of days in the specified year of the current era.

(Inherited from Calendar)
GetDaysInYear(Int32, Int32) GetDaysInYear(Int32, Int32) GetDaysInYear(Int32, Int32) GetDaysInYear(Int32, Int32)

傳回在指定紀元的指定年份中的日數。Returns the number of days in the specified year in the specified era.

GetEra(DateTime) GetEra(DateTime) GetEra(DateTime) GetEra(DateTime)

傳回指定 DateTime 中的紀元。Returns the era in the specified DateTime.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetHour(DateTime) GetHour(DateTime) GetHour(DateTime) GetHour(DateTime)

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

(Inherited from Calendar)
GetLeapMonth(Int32) GetLeapMonth(Int32) GetLeapMonth(Int32) GetLeapMonth(Int32)

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

(Inherited from Calendar)
GetLeapMonth(Int32, Int32) GetLeapMonth(Int32, Int32) GetLeapMonth(Int32, Int32) GetLeapMonth(Int32, Int32)

計算指定年份和紀元的閏月。Calculates the leap month for a specified year and era.

GetMilliseconds(DateTime) GetMilliseconds(DateTime) GetMilliseconds(DateTime) GetMilliseconds(DateTime)

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

(Inherited from Calendar)
GetMinute(DateTime) GetMinute(DateTime) GetMinute(DateTime) GetMinute(DateTime)

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

(Inherited from Calendar)
GetMonth(DateTime) GetMonth(DateTime) GetMonth(DateTime) GetMonth(DateTime)

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

GetMonthsInYear(Int32) GetMonthsInYear(Int32) GetMonthsInYear(Int32) GetMonthsInYear(Int32)

傳回目前紀元的指定年份中的月數。Returns the number of months in the specified year in the current era.

(Inherited from Calendar)
GetMonthsInYear(Int32, Int32) GetMonthsInYear(Int32, Int32) GetMonthsInYear(Int32, Int32) GetMonthsInYear(Int32, Int32)

傳回在指定紀元的指定年份中的月數。Returns the number of months in the specified year in the specified era.

GetSecond(DateTime) GetSecond(DateTime) GetSecond(DateTime) GetSecond(DateTime)

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

(Inherited from Calendar)
GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
GetWeekOfYear(DateTime, CalendarWeekRule, DayOfWeek) GetWeekOfYear(DateTime, CalendarWeekRule, DayOfWeek) GetWeekOfYear(DateTime, CalendarWeekRule, DayOfWeek) GetWeekOfYear(DateTime, CalendarWeekRule, DayOfWeek)

傳回年份中的週,其中包含指定之 DateTime 值中的日期。Returns the week of the year that includes the date in the specified DateTime value.

(Inherited from Calendar)
GetYear(DateTime) GetYear(DateTime) GetYear(DateTime) GetYear(DateTime)

傳回指定之 DateTime 值中的年份。Returns the year in the specified DateTime value.

IsLeapDay(Int32, Int32, Int32) IsLeapDay(Int32, Int32, Int32) IsLeapDay(Int32, Int32, Int32) IsLeapDay(Int32, Int32, Int32)

判斷目前紀元中指定日期是否為閏日。Determines whether the specified date in the current era is a leap day.

(Inherited from Calendar)
IsLeapDay(Int32, Int32, Int32, Int32) IsLeapDay(Int32, Int32, Int32, Int32) IsLeapDay(Int32, Int32, Int32, Int32) IsLeapDay(Int32, Int32, Int32, Int32)

判斷指定紀元中指定的日期是否為閏日。Determines whether the specified date in the specified era is a leap day.

IsLeapMonth(Int32, Int32) IsLeapMonth(Int32, Int32) IsLeapMonth(Int32, Int32) IsLeapMonth(Int32, Int32)

判斷目前紀元的指定年份中指定的月份是否為閏月。Determines whether the specified month in the specified year in the current era is a leap month.

(Inherited from Calendar)
IsLeapMonth(Int32, Int32, Int32) IsLeapMonth(Int32, Int32, Int32) IsLeapMonth(Int32, Int32, Int32) IsLeapMonth(Int32, Int32, Int32)

判斷指定紀元的指定年份中指定的月份是否為閏月。Determines whether the specified month in the specified year in the specified era is a leap month.

IsLeapYear(Int32) IsLeapYear(Int32) IsLeapYear(Int32) IsLeapYear(Int32)

判斷目前紀元中指定的年份是否為閏年。Determines whether the specified year in the current era is a leap year.

(Inherited from Calendar)
IsLeapYear(Int32, Int32) IsLeapYear(Int32, Int32) IsLeapYear(Int32, Int32) IsLeapYear(Int32, Int32)

判斷指定紀元中指定的年份是否為閏年。Determines whether the specified year in the specified era is a leap year.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32) ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32) ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32) ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32)

傳回設定為目前紀元中指定日期和時間的 DateTimeReturns a DateTime that is set to the specified date and time in the current era.

(Inherited from Calendar)
ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32) ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32) ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32) 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) ToFourDigitYear(Int32) ToFourDigitYear(Int32) ToFourDigitYear(Int32)

將指定的年份轉換為 4 位數年份,方法是使用 TwoDigitYearMax 屬性以判斷適當的世紀。Converts the specified year to a 4-digit year by using the TwoDigitYearMax property to determine the appropriate century.

ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)

適用於

另請參閱