Skip to content

Commit

Permalink
[Fix] Display first month as 1 not 0.
Browse files Browse the repository at this point in the history
  • Loading branch information
beto committed Dec 30, 2015
1 parent 322a2ad commit 1c8317a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/browser/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
lastName = faker.name.lastName();

var dob = faker.date.past(50, new Date("Sat Sep 20 1992 21:35:02 GMT+0200 (CEST)"));
dob = dob.getFullYear() + "-" + dob.getMonth() + "-" + dob.getDate();
dob = dob.getFullYear() + "-" + (dob.getMonth()+1) + "-" + dob.getDate(); // First month is "1"
$('#inputName').attr("value", faker.name.findName(firstName, lastName));
$('#inputDob').attr("value", dob);
$('#inputStreetAddress').attr("value", faker.address.streetAddress());
Expand Down

0 comments on commit 1c8317a

Please sign in to comment.