aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEd Shadi <[email protected]>2014-06-16 11:33:15 -0700
committerEd Shadi <[email protected]>2014-06-16 11:33:15 -0700
commit8b894a08c89ae803bbd3c2a9721ff859fae13ea5 (patch)
tree898cd7cb44fcd42bc3bde0d71a964ce7e663fde0 /lib
parentdaa95b3a4f3eb5131970271be3820ddb45d30022 (diff)
downloadfaker-8b894a08c89ae803bbd3c2a9721ff859fae13ea5.tar.xz
faker-8b894a08c89ae803bbd3c2a9721ff859fae13ea5.zip
added hours in date.recent. Currently the code returns date in past minutes. random days could return 0 so modified the test to reflect <= current date.
Diffstat (limited to 'lib')
-rw-r--r--lib/date.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/date.js b/lib/date.js
index 795e674e..23e0dc58 100644
--- a/lib/date.js
+++ b/lib/date.js
@@ -33,7 +33,7 @@ var date = {
recent: function (days) {
var date = new Date();
var future = date.getTime();
- future -= Faker.random.number(days) * 3600 * 1000; // some time from now to N days ago, in milliseconds
+ future -= Faker.random.number(days) * 24 * 60 * 60 * 1000; // some time from now to N days ago, in milliseconds
date.setTime(future)
return date.toJSON();