get current year month day javascript

 

 

 

 

In this article, we will get days of current month in JavaScript, this JavaScript code is suitable with the Leap and non leap year. Submitted by Abhishek Pathak, on November 05, 2017. JavaScript has a good support when it comes to date. second checkLength(date.getSeconds()) return day - month - year hour : minute : second It pains me to use it like that, im no pro with js so im asking, is there a method like in php date(d-m-Y H:i:s, time()) with which you can get current datetime in nice and clean way instead Simple JavaScript code to display current date, month and year by getFullYear() method.button>