public JsInstance GetSecondsImpl(JsDictionaryObject target, JsInstance[] parameters) { if (double.IsNaN(target.ToNumber())) { return(this.Global.NaN); } JsNumberConstructor numberClass = this.Global.NumberClass; DateTime dateTime = JsDateConstructor.CreateDateTime(target.ToNumber()); dateTime = dateTime.ToLocalTime(); double second = (double)dateTime.Second; return((JsInstance)numberClass.New(second)); }
public JsInstance GetUTCHoursImpl(JsDictionaryObject target, JsInstance[] parameters) { if (double.IsNaN(target.ToNumber())) { return(this.Global.NaN); } JsNumberConstructor numberClass = this.Global.NumberClass; DateTime dateTime = JsDateConstructor.CreateDateTime(target.ToNumber()); dateTime = dateTime.ToUniversalTime(); double hour = (double)dateTime.Hour; return((JsInstance)numberClass.New(hour)); }