From 1c8317a0907114c844798dfc2b75e3daea94b6a5 Mon Sep 17 00:00:00 2001 From: beto Date: Wed, 30 Dec 2015 18:17:11 +0100 Subject: [PATCH] [Fix] Display first month as 1 not 0. --- examples/browser/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/browser/index.html b/examples/browser/index.html index c45a31ee0..99a961ddc 100644 --- a/examples/browser/index.html +++ b/examples/browser/index.html @@ -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());