How TO - Get Current Date With JavaScript


Learn how to get the current date with JavaScript.


Current Date

Use new Date() to get the current date:

Example

const d = new Date();
Try it Yourself »

Read more about Dates in our JavaScript Dates Tutorial.


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.