Dates & Times

The Date is infact an interface not a data type

Date objects use an integer value that is the number of milliseconds since 1 January 1970 UTC.

var date1 = new Date("January 5, 2019 02:36:00") 

Dates are declared using the Date constructor
This is an object
The month parameter is zero based

var myDate = new Date(2020,11,01);   //this is December 
var myDate = new Date("1 July 2020");
var myTodaysDate = new Date();

const myDate = '20.10.1999';  

var myDate = new Date(); 
var myHour = myDate.getHours();



Datejs library

© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited TopNext