Answers for "current date-time javascript"


javascript current date time

var today = new Date().toLocaleDateString(undefined, {
    day: '2-digit',
    month: '2-digit',
    year: 'numeric',
    hour: '2-digit',
    minute: '2-digit',
    second: '2-digit'
Posted by: Guest on April-07-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 "current date-time javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language