Skip to content
This repository was archived by the owner on Aug 20, 2019. It is now read-only.

Commit a07efe5

Browse files
author
Jake Smith
committed
Build v0.2.0
1 parent d7bb32e commit a07efe5

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"dependencies": {},
1616
"lib": ".",
1717
"main": "timecop.js",
18-
"version": "0.1.1",
18+
"version": "0.2.0",
1919
"devDependencies": {
2020
"jshint": "~1.1.0"
2121
}

timecop.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Timecop.js version 0.1.1
1+
// Timecop.js version 0.2.0
22
// (c) 2010 James A. Rosen, Zendesk Inc.
33
// Timecop.js is freely distributable under the MIT license.
44
// The concept and some of the structure is borrowed from Timecop,
@@ -163,6 +163,12 @@ Timecop.MockDate.parse = function(dateString) {
163163
return Timecop.NativeDate.parse(dateString);
164164
};
165165

166+
if (Timecop.NativeDate.hasOwnProperty('now')) {
167+
Timecop.MockDate.now = function() {
168+
return new Timecop.MockDate().getTime();
169+
};
170+
}
171+
166172
Timecop.MockDate.prototype = {};
167173

168174
// Delegate `method` to the underlying date,

0 commit comments

Comments
 (0)