We can create Date objects using the Date() constructor.
Different ways of initiating dates:
For current date and time: new Date()
For milliseconds: new Date(milliseconds)
For Date : new Date(dateString)
For Year, month, day, hours, minutes, seconds, milliseconds): new Date(year, month, day, hours, minutes, seconds, milliseconds)
If you don’t specify a parameter 0 to be passed in. Dates are calculated in milliseconds as of 01 January,1970 00:00:00 UTC
Examples of dates:
var tod = new Date()
var d1 = new Date(89,4,21)
var d2 = new Date(89,4,21,12,30,0)
Creating Date Object in JavaScript
We can create Date objects using the Date() constructor.
Different ways of initiating dates:
For current...
date object javascript
Also tagged with one or more of these keywords: date object, javascript
Web Design →
Javascript →
Comparing Strings in JavaScriptStarted by Salwa, 18 Jul 2013 comparing strings, javascript |
|
|
||
Web Design →
Javascript →
Using OnSubmit in JavaScriptStarted by Salwa, 18 Jul 2013 javascript, onsubmit event |
|
|
||
Web Design →
Javascript →
Downloading Javascript to iPodStarted by OneDes, 13 Jun 2013 downloading, javascript, to ipod |
|
|
||
Web Design →
Javascript →
Downloading JavaScript to BlackBerryStarted by OneDes, 13 Jun 2013 downloading, javascript and 1 more... |
|
|
||
Web Design →
Javascript →
Enabling JavaScript on a MacStarted by OneDes, 13 Jun 2013 enable, javascript, mac |
|
|
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users