January is month 0. December is month 11. So this should work:

var d = new Date(2016, 11, 17, 0, 0, 0, 0);

Also, you can just simply do:

var d = new Date(2016, 11, 17);
Answer from Dean Coakley on Stack Overflow
🌐
W3Schools
w3schools.com › js › js_dates.asp
W3Schools.com
JS Examples JS HTML DOM JS HTML ... Date Objects let us work with dates: Year: Month: Day: Hours: Minutes: Seconds: const d = new Date(); Try it Yourself » ·...
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Date
Date - JavaScript | MDN
Returns the day of the month (1 – 31) for the specified date according to local time. ... Returns the day of the week (0 – 6) for the specified date according to local time. ... Returns the year (4 digits for 4-digit years) of the specified date according to local time.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Date › Date
Date() constructor - JavaScript | MDN
For example, new Date(2020, 5, 0) will return May 31st, 2020. ... Integer value representing the year. Values from 0 to 99 map to the years 1900 to 1999. All other values are the actual year. See the example. ... Integer value representing the month, beginning with 0 for January to 11 for December.
🌐
Bobby Hadz
bobbyhadz.com › blog › javascript-create-date-from-day-month-year
Create a Date from day, month, year in JavaScript | bobbyhadz
The Date() constructor takes the year, a zero-based value for the month and the day as parameters and returns a Date object. index.js · Copied!const date = new Date(2022, 0, 24); // 👇️ Mon Jan 24 2022 00:00:00 console.log(date); The code ...
🌐
W3Schools
w3schools.com › js › js_date_methods.asp
JavaScript Get Date Methods
The getFullYear() method returns ... code might use the non-standard method getYear(). ... The getMonth() method returns the month of a date as a number (0-11)....
Find elsewhere
🌐
JavaScript.info
javascript.info › tutorial › the javascript language › data types
Date and time
The month count starts with 0 (Jan), up to 11 (Dec). The date parameter is actually the day of month, if absent then 1 is assumed. If hours/minutes/seconds/ms is absent, they are assumed to be equal 0. ... new Date(2011, 0, 1, 0, 0, 0, 0); // ...
🌐
Bugfender
bugfender.com › blog › javascript-date-and-time
The Definitive Guide to JavaScript Date and Time | Bugfender
February 18, 2025 - - 23 represents the hour between 1 to 24. - 15 represents the minute. - 34 represents the second. - 0 represent the millisecond. */ const date = new Date(2023, 8, 10, 23, 15, 34, 0); console.log(date);
🌐
Mozilla
developer.mozilla.org › en-US › docs › Web › JavaScript › Guide › Representing_dates_times
Representing dates & times - JavaScript | MDN
The exact forms supported differ among engines, but the following form is always supported: YYYY-MM-DDTHH:mm:ss.sssZ. For example, xmas95 = new Date("1995-12-25"). If you omit hours, minutes, or seconds, the value will be set to zero. A set of integer values for year, month, and day.
🌐
Bobby Hadz
bobbyhadz.com › blog › javascript-get-year-month-day-from-date
Get Year, Month and Day from a Date Object in JavaScript | bobbyhadz
... Copied!const date = new Date(); const year = date.getUTCFullYear(); const month = date.getUTCMonth() + 1; const day = date.getUTCDate(); const withSlashes = [year, month, day].join('/'); console.log(withSlashes); // 👉️ 2023/7/25 const ...
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Date › getMonth
Date.prototype.getMonth() - JavaScript | MDN
The getMonth() method of Date instances returns the month for this date according to local time, as a zero-based value (where zero indicates the first month of the year). const moonLanding = new Date("July 20, 69 00:20:18"); console.log(moonLanding.getMonth()); // (January gives 0) // Expected ...
🌐
Tutorial Republic
tutorialrepublic.com › faq › how-to-get-day-month-and-year-from-a-date-object-in-javascript.php
How to Get Day, Month and Year from a Date Object in JavaScript
<script> var d = new Date(); var date = d.getUTCDate(); var month = d.getUTCMonth() + 1; // Since getUTCMonth() returns month from 0-11 not 1-12 var year = d.getUTCFullYear(); var dateStr = date + "/" + month + "/" + year; document.write(dateStr); ...
🌐
Moment.js
momentjs.com › docs
Moment.js | Docs
Day of Month (1 or 2 digit), followed by a three-letter month and 2 or 4 digit year · Two-digit hours and minutes separated by a colon (:), followed optionally by another colon and seconds in 2-digits · Timezone or offset in one of the following formats: ... The parser also confirms that ...
🌐
freeCodeCamp
freecodecamp.org › news › javascript-date-format-how-to-format-a-date-in-js
JavaScript Date Format – How to Format a Date in JS
November 7, 2024 - let stringDate = Date(); console.log(stringDate); // "Tue Aug 23 2022 14:47:12 GMT-0700 (Pacific Daylight Time)" let objectDate = new Date(); console.log(objectDate); // Tue Aug 23 2022 14:47:12 GMT-0700 (Pacific Daylight Time) These full format dates comprise the day, month, year, minute, hour, and other information you don't need all the time.
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › how-to-get-the-first-day-of-the-year-in-javascript
How to get the first day of the year in JavaScript ? - GeeksforGeeks
July 12, 2025 - Example: This example uses the ... = new Date(); console.log("Today = " + date); // Use Date(year, month, day) function console.log(new Date(date.getFullYear(), 0, 1));...
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-date-objects
JavaScript Date Objects - GeeksforGeeks
July 11, 2025 - You can perform various date manipulations such as adding or subtracting days, months, or years to/from a specific date. ... let cDate = new Date(); cDate.setDate(cDate.getDate() + 5); // Adds 5 days to the current date console.log(cDate);
🌐
Envato Tuts+
code.tutsplus.com › home › javascript
How to Get and Set the Day, Month, Year, or Time in JavaScript | Envato Tuts+
June 9, 2023 - In this tutorial, we will learn ... date and time on a user's system. The easiest way to do that is to instantiate a new Date object using the Date() ......