It is the definition of the Date object to use values 0-11 for the month field.

I believe that the constructor using a String is system-dependent (not to mention locale/timezone dependent) so you are probably better off using the constructor where you specify year/month/day as separate parameters.

BTW, in Firefox,

new Date("04/02/2008");

It works fine for me - it will interpret slashes, but not hyphens. This proves my point that using a String to construct a Date object is problematic. Use explicit values for month/day/year instead:

new Date(2008, 3, 2);
Answer from matt b on Stack Overflow
🌐
W3Schools
w3schools.com › jsref › jsref_constructor_date.asp
Javascript Date constructor Property
The constructor property returns the function that created the Date prototype. For JavaScript dates the constructor property returns:
Discussions

Be careful when falling back to Date constructor
If you clicked on the warning link and landed here: moment construction using a non-iso string is deprecated. What this means is you can safely do > moment("2014-04-25T01:32:21.196Z"); // iso strin... More on github.com
🌐 github.com
136
January 9, 2014
How to REALLY get a UTC Date object

var date = new Date('2015-10-11T14:03:19.243Z'); var str = date.toISOString();

More on reddit.com
🌐 r/javascript
6
1
February 16, 2014
🌐
TutorialsPoint
tutorialspoint.com › home › javascript › javascript date object
JavaScript Date() constructor
September 1, 2008 - The Date() constructor in JavaScript is used to create a new Date object that represents the current date and time.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Date › Date
Date() constructor - JavaScript | MDN
July 10, 2025 - The Date() constructor creates Date objects. When called as a function, it returns a string representing the current time.
🌐
Reality Ripple
udn.realityripple.com › docs › Web › JavaScript › Reference › Global_Objects › Date › Date
Date() constructor - JavaScript
Creates a JavaScript Date instance that represents a single moment in time in a platform-independent format.
Find elsewhere
🌐
Mozilla
interactive-examples.mdn.mozilla.net › pages › js › date-constructor.html
JavaScript Demo: Date Constructor
const date1 = new Date('December 17, 1995 03:24:00'); // Sun Dec 17 1995 03:24:00 GMT... const date2 = new Date('1995-12-17T03:24:00'); // Sun Dec 17 1995 03:24:00 GMT... console.log(date1 === date2); // Expected output: false console.log(date1 - date2); // Expected output: 0 · JavaScript ...
🌐
GitHub
github.com › moment › moment › issues › 1407
Be careful when falling back to Date constructor · Issue #1407 · moment/moment
January 9, 2014 - In the upcoming releases a few more well defined formats might be added, but the general idea of using any random string to construct a date is no more. If you really want that behavior just do moment(new Date("random string that contains date")), but moment won't be responsible for such convertions.
Published   Jan 09, 2014
🌐
Acrobatusers
answers.acrobatusers.com › TypeError-Date-constructor-q274696.aspx
TypeError: Date is not a constructor (JavaScript)
So strange that it just now caught me doing that... been using that code for a few months. Thanks Gilad D (try67)! :) Answer : var v1 = this.getField("Text1");v1.value = util.printd("mm/dd/yyyy",new Date()); don't use "Date" as a variable name, also learned it's best not to capitalize variables ...
🌐
DEV Community
dev.to › raerpo › my-mistakes-with-dates-on-javascript-35el
My mistakes with Dates on JavaScript - DEV Community
February 21, 2020 - I had a string date like this '2020-02-21' and I just passed it like that to a Date constructor and I got this: new Date('2020-02-21') // Date Thu Feb 20 2020 21:00:00 GMT-0300 (Chile Summer Time) 🤦🏻‍♂️🤦🏻‍♂️🤦🏻‍♂️🤦🏻‍♂️🤦🏻‍♂️🤦🏻‍♂️🤦🏻‍♂️ · So instead of getting the date that I (naively) expected, I got the day before that. And it makes total sense since JavaScript will parse the date in UTC and then apply the timezone change to set it in my system timezone.
🌐
W3Schools
w3schools.com › js › js_date_formats.asp
JavaScript Date Formats
ISO 8601 is the international standard for the representation of dates and times. The ISO 8601 syntax (YYYY-MM-DD) is also the preferred JavaScript date format:
🌐
W3Schools
w3schools.com › js › js_date_methods.asp
JavaScript Date Methods
The getDay() method returns the weekday of a date as a number (0-6). In JavaScript, the first day of the week (day 0) is Sunday.
🌐
freeCodeCamp
freecodecamp.org › news › javascript-date-now-how-to-get-the-current-date-in-javascript
JavaScript Date Now – How to Get the Current Date in JavaScript
June 15, 2020 - now() is a static method of the Date object. It returns the value in milliseconds that represents the time elapsed since the Epoch. You can pass in the milliseconds returned from the now() method into the Date constructor to instantiate a new Date object:
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Date › UTC
Date.UTC() - JavaScript | MDN
Date.UTC() when passed one argument used to have inconsistent behavior, because implementations only kept the behavior consistent with the Date() constructor, which does not interpret a single argument as the year number.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Intl › DateTimeFormat › DateTimeFormat
Intl.DateTimeFormat() constructor - JavaScript | MDN
January 21, 2026 - const date = new Date(Date.UTC(2020, 11, 20, 3, 23, 16, 738)); // Results below assume UTC timezone - your results may vary // Specify default date formatting for language (locale) console.log(new Intl.DateTimeFormat("en-US").format(date)); // Expected output: "12/20/2020" // Specify default date formatting for language with a fallback language (in this case Indonesian) console.log(new Intl.DateTimeFormat(["ban", "id"]).format(date)); // Expected output: "20/12/2020" // Specify date and time format using "style" options (i.e.
🌐
Codecademy
codecademy.com › docs › javascript › dates
JavaScript | Dates | Codecademy
September 5, 2023 - When used as a function, Date() returns the current date and time. When used as a constructor, Date() returns a new date object.
🌐
BitDegree
bitdegree.org › learn › javascript-date-object
JavaScript Date Object Explained: Create JavaScript New Date
August 8, 2017 - Using new Date(number) creates a date with 0 time, which means the value of the date object will be 01 January 1970 00:00:00 UTC, plus the number you entered: ... Using JavaScript date object new Date(7 numbers) will create an object that will display the years, months, days, hours, minutes, seconds, and milliseconds of the date:
🌐
TypeScript
typescriptlang.org › docs › handbook › utility-types.html
TypeScript: Documentation - Utility Types
Constructs a type consisting of the instance type of a constructor function in Type.