News

You can pass a date string of an accepted format when creating a new Date object. const date = new Date (“2020-12-31”); Now, if we print the created date, it shows this.