Answers for "javascript get current date/time"


return current date in javascript

let today = new Date().toLocaleDateString()

Posted by: Guest on March-01-2020

current date in javascript

const localDate = new Date();
const months = [

const days = [
   "Monday ",
const currentDay = days[localDate.getDay()];

const currentDate = localDate.getDate();

const currentMonth = months[localDate.getMonth()];

const currentYear = localDate.getFullYear();

console.log(`${currentDay}, ${currentDate} ${currentMonth}, ${currentYear}`);
Posted by: Guest on February-10-2021

Code answers related to "javascript get current date/time"

Code answers related to "Javascript"

Browse Popular Code Answers by Language