DatePrototype.setYear(Object, Double) 方法

定义

将 a DateObject 的年份值设置为指定的年份值。

此 API 支持产品基础结构,不能在代码中直接使用。

public:
 static double setYear(System::Object ^ thisob, double dyear);
[Microsoft.JScript.JSFunction(Microsoft.JScript.JSFunctionAttributeEnum.HasThisObject, Microsoft.JScript.JSBuiltin.Date_setYear)]
[Microsoft.JScript.NotRecommended("setYear")]
public static double setYear(object thisob, double dyear);
[<Microsoft.JScript.JSFunction(Microsoft.JScript.JSFunctionAttributeEnum.HasThisObject, Microsoft.JScript.JSBuiltin.Date_setYear)>]
[<Microsoft.JScript.NotRecommended("setYear")>]
static member setYear : obj * double -> double
Public Shared Function setYear (thisob As Object, dyear As Double) As Double

参数

thisob
Object

此方法所依据的对象。

dyear
Double

要设置的 thisob年份值。

返回

设置该值后的新值 thisob

属性

适用于

另请参阅