ts date toisostring incorrect conversion 1

ts date toisostring incorrect conversion

new Date(Date.UTC(2021, 04, 30)).toISOString()

Here is what the above code is Doing:
1. We’re creating a new Date object, and passing in the year, month, and day.
2. We’re calling the toISOString() method on the Date object, which returns a string in the format YYYY-MM-DDTHH:MM:SS.sssZ.
3. We’re assigning the result to the variable endDate.

Similar Posts