This post will discuss how to get the current date MM/DD/YYYY format in JavaScript.

1. Using Date() constructor

The Date() constructor constructs a new Date object representing the current date and time. The Date class has several utility methods to get the current date, month, and year to extract the date information. This is demonstrated below:

Download  Run Code

2. Using toLocaleDateString() method

The toLocaleDateString() method returns a string representing the date portion of the given Date instance according to language-specific conventions. To get month-day-year order, use en-US locale, as shown below:

Download  Run Code

3. Using Moment.js Library

If you’re already using the Moment.js library, consider using the format() method, which accepts the desired format to parse a moment.

Download Code

That’s all about getting the current date in JavaScript.