Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Date javascript

var d= new Date();  // generate today's DATE
console.log (d);

var s= new Date ("2020-09-15"); // generate the specific DATE:spetember 9 2020
var y=new Date().getFullYear(); // generate the year of specific DATE
var m=new Date().getMonth(); // generate the month of specific DATE
var d=new Date().getDay(); // generate the day of specific DATE
var D=new Date().getDate(); // generate  the specific DATE
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #Date #javascript
ADD COMMENT
Topic
Name
3+3 =