{"ScriptPreparationCode":"var seed = Date.now();\r\n\r\nvar twoDigits = [];\r\n\r\nfor(let i = 0; i\u003C100; i\u002B\u002B) {\r\n\ttwoDigits.push(String(i).padStart(2, \u00270\u0027));\r\n}\r\n\r\nvar threeDigits = [];\r\n\r\nfor(let i = 0; i\u003C1000; i\u002B\u002B) {\r\n\tthreeDigits.push(String(i).padStart(3, \u00270\u0027));\r\n}\r\n\r\nfunction toISO1(x) {\r\n Number.isFinite(x);\r\n\r\n const time = new Date(x);\r\n \r\n const year = String(time.getUTCFullYear());\r\n const mo = twoDigits[time.getUTCMonth()\u002B1];\r\n const da = twoDigits[time.getUTCDate()];\r\n const ho = twoDigits[time.getUTCHours()];\r\n const mi = twoDigits[time.getUTCMinutes()];\r\n const se = twoDigits[time.getUTCSeconds()];\r\n const mil = threeDigits[time.getUTCMilliseconds()];\r\n \r\n return [year, \u0027-\u0027, mo, \u0027-\u0027, da, \u0027T\u0027, ho, \u0027:\u0027, mi, \u0027:\u0027, se, \u0027.\u0027, mil, \u0027Z\u0027].join(\u0027\u0027);\r\n}\r\n\r\nfunction toISO2(x) {\r\n\treturn new Date(x).toISOString();\r\n}","TestCases":[{"Name":"template strings and padding","Code":"var value = toISO1(seed);","IsDeferred":false},{"Name":"toISOString()","Code":"var value = toISO2(seed);","IsDeferred":false}]}