//public override RuntimeObj ToPrimitive( GlobalContext c ) //{ // return c.CreateString( JSSupport.ToString( _value ) ); //} public override bool Equals(object obj) { if (obj == this) { return(true); } JSEvalDate d = obj as JSEvalDate; return(d != null ? d._value == _value : false); }
public int CompareTo(object obj) { JSEvalDate d = obj as JSEvalDate; if (d != null) { return(_value.CompareTo(d._value)); } if (obj is DateTime) { return(_value.CompareTo((DateTime)obj)); } throw new ArgumentException("Must be a Date.", "obj"); }
public GlobalContext() { _epoch = new JSEvalDate(JSSupport.JSEpoch); }