TimeShift-js
TimeShift-js copied to clipboard
Library for mocking JavaScript's Date object
To make this pass: ``` js test("instanceof Date", function() { ok(new TimeShift.Date() instanceof Date); }); ``` Do `TimeShift.Date.prototype = new Date()`
it'd be better to merge new methods with Data object instead of overriding Data object, because there are some other libraries that can add their own methods to Data object...
``` > Date = TimeShift.Date > new TimeShift.Date().toLocaleDateString() TypeError: Method invoked on an object that is not Date. > new TimeShift.OriginalDate().toLocaleDateString() TypeError: Method invoked on an object that is not...