Introduction to js date format
What are constructors in js date format?
- Date(): Current date and time representing a string are returned when using date() constructors.
- New date(): A new date object is returned using this constructor.
- ISO Dates : “2023-01-17”(international standard)
- Short Date: “7-15-2020”
- Long Date: “Jan 17 2023” or “17 Jan 2023”
The default output dates for js date format, independent of the platform, is in full string format.
Mon Jan 16 2023 12:47:13 GMT+0530 (India Standard Time)
ISO DATES –
Syntax for Iso Date
const date = new Date(“2023-01-17”);