GregorianCalendar.GetWeekOfYear(DateTime, CalendarWeekRule, DayOfWeek) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回年份中的週,包含指定 DateTime 物件中的日期。
public:
override int GetWeekOfYear(DateTime time, System::Globalization::CalendarWeekRule rule, DayOfWeek firstDayOfWeek);
[System.Runtime.InteropServices.ComVisible(false)]
public override int GetWeekOfYear (DateTime time, System.Globalization.CalendarWeekRule rule, DayOfWeek firstDayOfWeek);
[<System.Runtime.InteropServices.ComVisible(false)>]
override this.GetWeekOfYear : DateTime * System.Globalization.CalendarWeekRule * DayOfWeek -> int
Public Overrides Function GetWeekOfYear (time As DateTime, rule As CalendarWeekRule, firstDayOfWeek As DayOfWeek) As Integer
參數
- rule
- CalendarWeekRule
其中一個 CalendarWeekRule 值,可定義行事曆週。
傳回
從 1 起始的整數,表示 time
參數中日期所屬年份中的某週。
- 屬性