Article

Introduction

https://cdn.jsdelivr.net/npm/[email protected]/dist/js.cookie.min.js
Copy to clipboard

A date object is used to represent date and time. It provides functions for manipulating, printing and storing dates.

We can use the following lines of code to get a date object: https://raw.githubusercontent.com/finsweet/jqueryCourse/main/jsobjects/ex7.js?actionable=false

milliseconds, datestring, year, month, hour, minute, date, seconds and milliseconds are variables that a developer can specify.

Except for datestring, all variables should be written as numbers. In the last line of code Hour, minute second and milliseconds are optional values and may or may not be specified.

<script>
$(document).ready(function(){
  XT1
});
</script>
Copy to clipboard
Send to Live Demo

Live demo

<div id="minidivpage" class="example-live"><div id="resultdiv">.</div></div>

<script>    
$(document).ready(function() {
  XT1
});
</script>
<script>
  
</script>
Copy to clipboard
Press the Run Demo button to execute the scripts above.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Your browser is too small

Resize your browser to be at least 769px wide.