FirstWeekOfYear 枚举
定义
指示在调用与日期相关的函数时使用的每年的第一周。Indicates the first week of the year to use when calling date-related functions.
public enum class FirstWeekOfYear
public enum FirstWeekOfYear
type FirstWeekOfYear =
Public Enum FirstWeekOfYear
- 继承
字段
FirstFourDays | 2 | 第一个至少包含新年中的四天的周。The first week that has at least four days in the new year. 此成员等效于 Visual Basic 常量 |
FirstFullWeek | 3 | 一年中第一个完整的周。The first full week of the year. 此成员等效于 Visual Basic 常量 |
Jan1 | 1 | 1 月 1 日所在的周(默认)。The week in which January 1 occurs (default). 此成员等效于 Visual Basic 常量 |
System | 0 | 在系统设置中指定为一年的第一周的周。The week specified in your system settings as the first week of the year. 此成员等效于 Visual Basic 常量 |
注解
调用与日期相关的函数时, 可以在代码中使用以下枚举成员来代替实际值。When you call date-related functions, you can use the following enumeration members in your code in place of the actual values.
一些与日期相关的函数采用DayOfWeek
参数WeekOfYear
和/或参数。Some date-related functions take a DayOfWeek
argument, a WeekOfYear
argument, or both. 枚举指定WeekOfYear
参数的有效值以及函数的可能的返回值。 FirstWeekOfYear
The FirstWeekOfYear
enumeration specifies the valid values for the WeekOfYear
arguments, as well as the possible return values from the functions.
WeekOfYear
参数FirstWeekOfYear
采用枚举成员。The WeekOfYear
argument takes the FirstWeekOfYear
enumeration members.
适用于
另请参阅
- FirstDayOfWeek
- DateFormat
- DateDiff(DateInterval, DateTime, DateTime, FirstDayOfWeek, FirstWeekOfYear)
- DatePart(DateInterval, DateTime, FirstDayOfWeek, FirstWeekOfYear)
- Format(Object, String)
- Weekday(DateTime, FirstDayOfWeek)
- 常量和枚举Constants and Enumerations
- 何时使用枚举When to Use an Enumeration
- 如何:引用枚举成员How to: Refer to an Enumeration Member