{"ScriptPreparationCode":null,"TestCases":[{"Name":"By string comparison","Code":"//this method isn\u0027t multiple timezone safe, make sure both dates are generated at the same timezone\r\nlet dateA = new Date(2023, 09, 27, 08, 02, 0);\r\n\r\nif (dateA.toISOString().split(\u0022T\u0022)[0] \u003C new Date().toISOString().split(\u0022T\u0022)[0]) {\r\n throw \u0022The dateA is past.\u0022;\r\n}","IsDeferred":false},{"Name":"By Date UTC and setHours zero","Code":"const dateA = new Date(2023, 09, 27, 08, 02, 0);\r\nconst today = new Date();\r\ntoday.setHours(0, 0, 0, 0)\r\n\r\nif (new Date(Date.UTC(dateA.getFullYear(), dateA.getMonth(), dateA.getDate()), 0, 0, 0, 0) \u003C today) {\r\n throw \u0022The dateA is past.\u0022;\r\n}","IsDeferred":false}]}