A Date is an object that contains a given time to millisecond precision.
Unlike strings and numbers, the date must be explicitly created with the new operator.
var date = new Date; // Create a new Date object with the current date and time.
The Date object may also be created using parameters passed to its constructor. By default, the Date object contains the current date and time found on the computer, but can be set to any date or time desired.
var time_before_2000 = new Date(1999, 12, 31, 23, 59, 59, 999);
The date can also be returned as an integer. This can apply to seeding a PRNG method, for example.
var integer_date = +new Date; // Returns a number, like 1362449477663.
The date object normally stores the value within the local time zone. If UTC is needed, there are a set of functions available for that use.
The Date object does not support non-CE epochs, but can still represent almost any available time within its available range.
Properties and methods of the Date object:
Manage research, learning and skills at defaultLogic. Create an account using LinkedIn or facebook to manage and organize your Digital Marketing and Technology knowledge. defaultLogic works like a shopping cart for information -- helping you to save, discuss and share.Visit defaultLogic's partner sites below: