Answers for "how to get date using js"

1

get date in javascript

document.write(new Date().getFullYear());
Posted by: Guest on November-09-2020
3

get date js

function getDate()
{
	let  today 		= new Date();
	let  dd 		= String(today.getDate()).padStart(2, '0');
	let  mm 		= String(today.getMonth() + 1).padStart(2, '0'); //janvier = 0
	let  yyyy 		= today.getFullYear();

	return dd + '/' + mm + '/' + yyyy;
}
Posted by: Guest on June-14-2021

Code answers related to "how to get date using js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language