Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Javascript
Subclassing Date weirdness.
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="nick, post: 5001741"] I think I worked out. In the class prototype definition: base.valueOf = function(){ return new Number(this._date.valueOf()) } Looks like because valueOf returns an object and not a primitive, toString gets used instead with the plus operator (just like Date instances). MyDates seems to act just like Dates now (but they're extendable). -- Nick [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Javascript
Subclassing Date weirdness.
Top