{"ScriptPreparationCode":"dayjs.extend(window.dayjs_plugin_isBetween)\r\nwindow.__date__ = new Date(\u00272000-01-06T03:24:11\u0027);\r\nwindow.__another_date__ = new Date(\u00272000-01-30T03:24:11\u0027);\r\nwindow.__another_month__ = new Date(\u00272000-02-01T00:00:00\u0027);\r\nwindow.__another_year__ = new Date(\u00271999-01-06T03:24:11\u0027);\r\nwindow.__saturday__ = new Date(\u00272021-05-01T03:24:11\u0027);\r\nwindow.__sunday__ = new Date(\u00272021-05-02T03:24:11\u0027);\r\nwindow._expected_string = \u00272000/01/06\u0027;\r\nwindow._expected_start = \u00272000/01/01\u0027;\r\nwindow._expected_end = \u00272000/01/31\u0027;\r\nwindow._expected_day_of_week = 1;\r\n\r\nwindow.unix = (date) =\u003E {\r\n return date.valueOf() / 1000;\r\n }\r\n\r\nwindow.diffDate = (date1, date2, unit) =\u003E {\r\n const date1Unix = unix(date1);\r\n const date2Unix = unix(date2);\r\n\r\n switch (unit) {\r\n case \u0022minute\u0022:\r\n return (date1Unix - date2Unix) / 60;\r\n case \u0022hour\u0022:\r\n return (date1Unix - date2Unix) / 3600;\r\n case \u0022day\u0022:\r\n return (date1Unix - date2Unix) / 86400;\r\n case \u0022week\u0022:\r\n return (date1Unix - date2Unix) / 604800;\r\n }\r\n }\r\n","TestCases":[{"Name":"luxon","Code":"var date1 = luxon.DateTime.fromJSDate(__date__);\r\nvar date2 = luxon.DateTime.fromJSDate(__another_date__);\r\n\r\ndate1.diff(date2, \u0022minute\u0022);\r\ndate1.diff(date2, \u0022hour\u0022);\r\ndate1.diff(date2, \u0022day\u0022);\r\ndate1.diff(date2, \u0022week\u0022);","IsDeferred":false},{"Name":"dayjs","Code":"var date1 = dayjs(__date__);\r\nvar date2 = dayjs(__another_date__);\r\n\r\ndate1.diff(date2, \u0022minute\u0022);\r\ndate1.diff(date2, \u0022hour\u0022);\r\ndate1.diff(date2, \u0022day\u0022);\r\ndate1.diff(date2, \u0022week\u0022);","IsDeferred":false},{"Name":"vanilla","Code":"var date1 = __date__;\r\nvar date2 = __another_date__;\r\n\r\ndiffDate(date1, date2, \u0022minute\u0022);\r\ndiffDate(date1, date2, \u0022hour\u0022);\r\ndiffDate(date1, date2, \u0022day\u0022);\r\ndiffDate(date1, date2, \u0022week\u0022);","IsDeferred":false}]}