{"ScriptPreparationCode":"var n = 1000;\r\nvar testValues = [...Array(n)].map((_, i) =\u003E {\r\n if (Math.random() \u003C 0.5) {\r\n const d = new Date();\r\n d.setMilliseconds(i);\r\n return d.toISOString();\r\n }\r\n return (Math.random() \u002B 1).toString(36).substring(2);\r\n});\r\n\r\n/**\r\n *\r\n */\r\nfunction isUTCDateTimeMs(value) {\r\n if (typeof value !== \u0022string\u0022) {\r\n return false;\r\n }\r\n\r\n const parsed = new Date(value);\r\n if (Number.isNaN(parsed.getTime())) {\r\n return false;\r\n }\r\n\r\n return value === parsed.toISOString();\r\n}\r\n\r\n/**\r\n *\r\n */\r\nfunction isUTCDateTimeMsDayJsy(value) {\r\n if (typeof value !== \u0022string\u0022) {\r\n return false;\r\n }\r\n\r\n const parsed = new Date(value);\r\n if (parsed.toString() === \u0022Invalid Date\u0022) {\r\n return false;\r\n }\r\n\r\n return value === parsed.toISOString();\r\n}\r\n\r\n/**\r\n *\r\n */\r\nfunction isUTCDateTimeMsParse(value) {\r\n if (typeof value !== \u0022string\u0022) {\r\n return false;\r\n }\r\n\r\n const parsed = Date.parse(value);\r\n if (Number.isNaN(parsed)) {\r\n return false;\r\n }\r\n\r\n const d = new Date(parsed);\r\n\r\n return value === d.toISOString();\r\n // try {\r\n // return value === new Date(value).toISOString();\r\n // } catch (err) {\r\n // return false;\r\n // }\r\n}\r\n\r\n/**\r\n *\r\n */\r\nfunction isUTCDateTimeMsTryCatch(value) {\r\n if (typeof value !== \u0022string\u0022) {\r\n return false;\r\n }\r\n\r\n try {\r\n return value === new Date(value).toISOString();\r\n } catch (err) {\r\n return false;\r\n }\r\n}\r\n","TestCases":[{"Name":"isUTCDateTimeMs","Code":"///\r\nlet r = 0;\r\nfor (const t of testValues) {\r\n r \u002B= \u002BisUTCDateTimeMs(t);\r\n}","IsDeferred":false},{"Name":"isUTCDateTimeMsDayJsy","Code":"///\r\nlet r = 0;\r\nfor (const t of testValues) {\r\n r \u002B= \u002BisUTCDateTimeMsDayJsy(t);\r\n}","IsDeferred":false},{"Name":"isUTCDateTimeMsParse","Code":"///\r\nlet r = 0;\r\nfor (const t of testValues) {\r\n r \u002B= \u002BisUTCDateTimeMsParse(t);\r\n}","IsDeferred":false},{"Name":"isUTCDateTimeMsTryCatch","Code":"///\r\nlet r = 0;\r\nfor (const t of testValues) {\r\n r \u002B= \u002BisUTCDateTimeMsTryCatch(t);\r\n}","IsDeferred":false}]}