Answers for "js get local date"

1

js get local date

var now = new Date();
console.log(now.toLocaleDateString()); // expected output: 2/26/2021 (MM/DD/YYYY)
Posted by: Guest on February-27-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language