{"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","TestCases":[{"Name":"luxon","Code":"var actual = luxon.DateTime.fromJSDate(__date__);\r\nconsole.assert(actual.toFormat(\u0027yyyy/MM/dd\u0027) === _expected_string);\r\nvar start = actual.startOf(\u0027month\u0027);\r\nconsole.assert(start.toFormat(\u0027yyyy/MM/dd\u0027) === _expected_start);\r\nvar end = actual.endOf(\u0027month\u0027);\r\nconsole.assert(end.toFormat(\u0027yyyy/MM/dd\u0027) === _expected_end);\r\nvar i = luxon.Interval.fromDateTimes(start, end);\r\nvar isBefore = luxon.DateTime.fromJSDate(__another_date__) \u003C end;\r\nconsole.assert(isBefore === true);\r\nvar isBetween = i.contains(actual);\r\nconsole.assert(isBetween === true);\r\nvar isInclusive = i.contains(start);\r\nconsole.assert(isInclusive === true);\r\nconsole.assert(luxon.DateTime.fromJSDate(__saturday__).weekday === 6);\r\nconsole.assert(start.hasSame(end, \u0027month\u0027) === true);\r\nconsole.assert(luxon.DateTime.fromJSDate(__another_month__).hasSame(end, \u0027month\u0027) === false);\r\nconsole.assert(luxon.DateTime.fromJSDate(__another_year__).hasSame(actual, \u0027month\u0027) === false);\r\nconsole.assert(luxon.DateTime.fromJSDate(__sunday__).daysInMonth === 31);","IsDeferred":false},{"Name":"date-fns","Code":"var actual = __date__;\r\nconsole.assert(dateFns.format(actual, \u0027YYYY/MM/DD\u0027) === _expected_string);\r\nvar start = dateFns.startOfMonth(actual);\r\nconsole.assert(dateFns.format(start, \u0027YYYY/MM/DD\u0027) === _expected_start);\r\nvar end = dateFns.endOfMonth(actual);\r\nconsole.assert(dateFns.format(end, \u0027YYYY/MM/DD\u0027) === _expected_end);\r\nvar isBetween = dateFns.isWithinRange(actual, start, end);\r\nconsole.assert(isBetween === true);\r\nvar isInclusive = dateFns.isWithinRange(start, start, end);\r\nconsole.assert(isInclusive === true);\r\nconsole.assert(dateFns.isSaturday(__saturday__) === true);\r\nconsole.assert(dateFns.isSameMonth(start, end) === true);\r\nconsole.assert(dateFns.isSameMonth(__another_month__, end) === false);\r\nconsole.assert(dateFns.isSameMonth(__another_year__, actual) === false);\r\nconsole.assert(dateFns.getDaysInMonth(__sunday__) === 31);","IsDeferred":false},{"Name":"dayjs","Code":"var actual = dayjs(__date__);\r\nconsole.assert(actual.format(\u0027YYYY/MM/DD\u0027) === _expected_string);\r\nvar start = actual.startOf(\u0027month\u0027);\r\nconsole.assert(start.format(\u0027YYYY/MM/DD\u0027) === _expected_start);\r\nvar end = actual.endOf(\u0027month\u0027);\r\nconsole.assert(end.format(\u0027YYYY/MM/DD\u0027) === _expected_end);\r\nvar isBetween = actual.isBetween(start, end);\r\nconsole.assert(isBetween === true);\r\nvar isInclusive = start.isBetween(start, end, \u0027day\u0027, \u0027[]\u0027);\r\nconsole.assert(isInclusive === true);\r\nconsole.assert(dayjs(__saturday__).day() === 6);\r\nconsole.assert(start.isSame(end, \u0027month\u0027) === true);\r\nconsole.assert(dayjs(__another_month__).isSame(end, \u0027month\u0027) === false);\r\nconsole.assert(dayjs(__another_year__).isSame(actual, \u0027month\u0027) === false);\r\nconsole.assert(dayjs(__sunday__).daysInMonth() === 31);","IsDeferred":false},{"Name":"js-joda","Code":"var actual = JSJoda.LocalDate.from(JSJoda.nativeJs(__date__));\r\nconsole.assert(actual.format(JSJoda.DateTimeFormatter.ofPattern(\u0027yyyy/MM/dd\u0027)) === _expected_string);\r\nvar start = actual.with(JSJoda.TemporalAdjusters.firstDayOfMonth());\r\nconsole.assert(start.format(JSJoda.DateTimeFormatter.ofPattern(\u0027yyyy/MM/dd\u0027)) === _expected_start);\r\nvar end = actual.with(JSJoda.TemporalAdjusters.lastDayOfMonth());\r\nconsole.assert(end.format(JSJoda.DateTimeFormatter.ofPattern(\u0027yyyy/MM/dd\u0027)) === _expected_end);\r\nvar isBetween = actual.compareTo(start) \u003E= 0 \u0026\u0026 actual.compareTo(end) \u003C= 0;\r\nconsole.assert(isBetween === true);\r\nvar isInclusive = start.compareTo(start) \u003E= 0 \u0026\u0026 start.compareTo(end) \u003C= 0;\r\nconsole.assert(isInclusive === true);\r\nconsole.assert(JSJoda.LocalDate.from(JSJoda.nativeJs(__saturday__)).dayOfWeek() === JSJoda.DayOfWeek.SATURDAY);\r\nconsole.assert(start.withDayOfMonth(1).equals(end.withDayOfMonth(1)));\r\nconsole.assert(JSJoda.LocalDate.from(JSJoda.nativeJs(__another_month__)).withDayOfMonth(1).equals(end.withDayOfMonth(1)) === false);\r\nconsole.assert(JSJoda.LocalDate.from(JSJoda.nativeJs(__another_year__)).withDayOfMonth(1).equals(actual.withDayOfMonth(1)) === false);\r\nconsole.assert(JSJoda.LocalDate.from(JSJoda.nativeJs(__sunday__)).lengthOfMonth() === 31);","IsDeferred":false}]}