Date ऑब्जेक्ट JavaScript भाषा में निर्मित एक डेटाटाइप है। Date ऑब्जेक्ट new Date() के साथ बनाए जाते हैं जैसा कि नीचे दिखाया गया है:
new Date() new Date(milliseconds) new Date(datestring) new Date(year,month,date[,hour,minute,second,millisecond])
उदाहरण
JavaScript में Date ऑब्जेक्ट लागू करने के लिए निम्न कोड चलाएं:
<html>
<head>
<title>JavaScript Dates</title>
</head>
<body>
<script>
var date = new Date();
document.write("dt.constructor is : " + date.constructor);
</script>
</body>
</html>
आउटपुट
dt.constructor is : function Date() { [native code] }