Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

current date in javascript

var today = new Date();
    var date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();
    console.log(date)
// output 2021-7-9
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #current #date #javascript
ADD COMMENT
Topic
Name
3+2 =