protected JsInstance DecodeURI(JsInstance[] arguments) { if (arguments.Length < 1 || arguments[0] == JsUndefined.Instance) { return(StringClass.New()); } return(this.StringClass.New(HttpUtility.UrlDecode(arguments[0].ToString()))); }
protected JsInstance DecodeURI(JsInstance[] arguments) { if (arguments.Length < 1 || arguments[0] == JsUndefined.Instance) { return(StringClass.New()); } return(this.StringClass.New(Uri.UnescapeDataString(arguments[0].ToString().Replace("+", " ")))); }
public JsInstance ToTimeStringImpl(JsDictionaryObject target, JsInstance[] parameters) { if (double.IsNaN(target.ToNumber())) { return((JsInstance)this.Global.StringClass.New(double.NaN.ToString())); } JsStringConstructor stringClass = this.Global.StringClass; DateTime dateTime = JsDateConstructor.CreateDateTime(target.ToNumber()); dateTime = dateTime.ToLocalTime(); string str = dateTime.ToString(JsDate.TIMEFORMAT, (IFormatProvider)CultureInfo.InvariantCulture); return((JsInstance)stringClass.New(str)); }
public JsInstance ToLocaleDateStringImpl( JsDictionaryObject target, JsInstance[] parameters) { if (double.IsNaN(target.ToNumber())) { return((JsInstance)this.Global.StringClass.New(double.NaN.ToString())); } JsStringConstructor stringClass = this.Global.StringClass; DateTime dateTime = JsDateConstructor.CreateDateTime(target.ToNumber()); dateTime = dateTime.ToLocalTime(); string str = dateTime.ToString(JsDate.DATEFORMAT); return((JsInstance)stringClass.New(str)); }