To change an ISO date string to a JavaScript date object, we can use the Date
constructor to convert it to a JavaScript date object.
For instance, we can write:
const d = new Date('2021-11-03T19:00:34.203Z');
const n = d.getUTCDate();
We just pass the ISO date string as the argument of the Date
constructor.
Then we call getUTCDate
to return the date of the month in UTC.
Therefore, n
is 3.