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
🌐
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.
🌐
W3Schools
w3schools.com › js › js_dates.asp
JavaScript Dates
const d = new Date(2018, 11, 24, 10, 33, 30, 0); Try it Yourself » ... January = 0. December = 11. Specifying a month higher than 11, will not result in an error but add the overflow to the next year: ... Specifying a day higher than max, will not result in an error but add the overflow to the next month: ... You cannot omit month. If you supply only one parameter it will be treated as milliseconds. ... JavaScript stores dates as number of milliseconds since January 01, 1970.
🌐
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); // ...
🌐
Bobby Hadz
bobbyhadz.com › blog › javascript-create-date-from-day-month-year
Create a Date from day, month, year in JavaScript | bobbyhadz
Copied!const str = '2022-01-24'; const [year, month, day] = str.split('-'); const date = new Date(+year, month - 1, day); // 👇️ Mon Jan 24 2022 00:00:00 console.log(date);
🌐
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.
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › how-to-get-day-month-and-year-from-date-object-in-javascript
How to get Day Month and Year from Date Object in JavaScript ? - GeeksforGeeks
November 28, 2023 - Example: In this example, we will be extracting Day, Month, and Year from the Date object in JavaScript using getUTCDate(), getUTCMonth(), and getUTCFullYear() methods. ... let obj = new Date(); let day = obj.getUTCDate(); let month = ...
Find elsewhere
🌐
W3Schools
w3schools.com › js › js_date_methods.asp
JavaScript 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)....
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Date › setMonth
Date.prototype.setMonth() - JavaScript | MDN
The setMonth() method of Date instances changes the month and/or day of the month for this date according to local time. const event = new Date("August 19, 1975 23:15:30"); event.setMonth(3); console.log(event.getMonth()); // Expected output: 3 console.log(event); // Expected output: "Sat Apr ...
🌐
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 ...
🌐
Moment.js
momentjs.com › docs
Moment.js | Docs
Get + Set Millisecond Second Minute Hour Date of Month Day of Week Day of Week (Locale Aware) ISO Day of Week Day of Year Week of Year Week of Year (ISO) Month Quarter Year Week Year Week Year (ISO) Weeks In Year Weeks In Year (ISO) Get Set Maximum Minimum · Manipulate Add Subtract Start of Time End of Time Maximum Minimum Local UTC UTC offset Time zone Offset · Display Format Time from now Time from X Time to now Time to X Calendar Time Difference Unix Timestamp (milliseconds) Unix Timestamp (seconds) Days in Month As Javascript Date As Array As JSON As ISO 8601 String As Object As String Inspect
🌐
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));...
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Date › setFullYear
Date.prototype.setFullYear() - JavaScript | MDN
The setFullYear() method of Date instances changes the year, month, and/or day of month for this date according to local time. const event = new Date("August 19, 1975 23:15:30"); event.setFullYear(1969); console.log(event.getFullYear()); // Expected output: 1969 event.setFullYear(0); ...
🌐
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 ...
🌐
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);
🌐
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); ...
🌐
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() ......