Javascript Date create date like Feb 20, 2012, 3:12am.

Introduction

We would like to create date object with value Feb 20, 2012, 3:12am.

The time zone is local.

Show it using console.log().

Hint

The new Date constructor uses the local time zone.

The months start from zero.

So February has number 1.



let d = new Date(2012, 1, 20, 3, 12);
console.log( d );



PreviousNext

Related