I would like to subclass the built-in Date object to get additional
functionality out of it, but the code below gives me an error
something like "object is not a date object". Is there something I'mm
doing wrong?
function foo() {
}
foo.prototype=n ew Date();
alert( new foo().getHours( ) );
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
functionality out of it, but the code below gives me an error
something like "object is not a date object". Is there something I'mm
doing wrong?
function foo() {
}
foo.prototype=n ew Date();
alert( new foo().getHours( ) );
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
Comment