@uxf/datepicker 11.90.0 → 11.93.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,7 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const dayjs_1 = __importDefault(require("dayjs"));
7
3
  require("dayjs/locale/cs");
4
+ const dayjs_en_1 = require("./dayjs-en");
8
5
  const get_weekday_labels_1 = require("./get-weekday-labels");
9
6
  test("getWeekdayLabels", () => {
10
7
  expect((0, get_weekday_labels_1.getWeekdayLabels)({})).toStrictEqual(["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]);
@@ -13,7 +10,7 @@ test("getWeekdayLabels with custom firstDayOfWeek", () => {
13
10
  expect((0, get_weekday_labels_1.getWeekdayLabels)({ firstDayOfWeek: 1 })).toStrictEqual(["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"]);
14
11
  });
15
12
  test("getWeekdayLabels with custom format", () => {
16
- expect((0, get_weekday_labels_1.getWeekdayLabels)({ weekdayLabelFormat: (date) => (0, dayjs_1.default)(date).format("dddd") })).toStrictEqual([
13
+ expect((0, get_weekday_labels_1.getWeekdayLabels)({ weekdayLabelFormat: (date) => (0, dayjs_en_1.dayjsEn)(date).format("dddd") })).toStrictEqual([
17
14
  "Sunday",
18
15
  "Monday",
19
16
  "Tuesday",
@@ -24,5 +21,8 @@ test("getWeekdayLabels with custom format", () => {
24
21
  ]);
25
22
  });
26
23
  test("getWeekdayLabels with custom format and locale", () => {
27
- expect((0, get_weekday_labels_1.getWeekdayLabels)({ firstDayOfWeek: 1, weekdayLabelFormat: (date) => (0, dayjs_1.default)(date).locale("cs").format("dddd") })).toStrictEqual(["pondělí", "úterý", "středa", "čtvrtek", "pátek", "sobota", "neděle"]);
24
+ expect((0, get_weekday_labels_1.getWeekdayLabels)({
25
+ firstDayOfWeek: 1,
26
+ weekdayLabelFormat: (date) => (0, dayjs_en_1.dayjsEn)(date).locale("cs").format("dddd"),
27
+ })).toStrictEqual(["pondělí", "úterý", "středa", "čtvrtek", "pátek", "sobota", "neděle"]);
28
28
  });
@@ -1,27 +1,24 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const dayjs_1 = __importDefault(require("dayjs"));
3
+ const dayjs_en_1 = require("./dayjs-en");
7
4
  const get_years_1 = require("./get-years");
8
5
  test("getYears", () => {
9
6
  expect((0, get_years_1.getYears)({ startYear: new Date("2018-08-15"), endYear: new Date("2021-05-03") })).toStrictEqual([
10
- { yearLabel: "2018", date: new Date("2018-01-01") },
11
- { yearLabel: "2019", date: new Date("2019-01-01") },
12
- { yearLabel: "2020", date: new Date("2020-01-01") },
13
- { yearLabel: "2021", date: new Date("2021-01-01") },
7
+ { yearLabel: "2018", date: new Date("2018-01-01T00:00:00+01:00") },
8
+ { yearLabel: "2019", date: new Date("2019-01-01T00:00:00+01:00") },
9
+ { yearLabel: "2020", date: new Date("2020-01-01T00:00:00+01:00") },
10
+ { yearLabel: "2021", date: new Date("2021-01-01T00:00:00+01:00") },
14
11
  ]);
15
12
  });
16
13
  test("getYears with custom format", () => {
17
14
  expect((0, get_years_1.getYears)({
18
15
  startYear: new Date("2018-08-15"),
19
16
  endYear: new Date("2021-05-03"),
20
- yearLabelFormat: (date) => (0, dayjs_1.default)(date).format("YY"),
17
+ yearLabelFormat: (date) => (0, dayjs_en_1.dayjsEn)(date).format("YY"),
21
18
  })).toStrictEqual([
22
- { yearLabel: "18", date: new Date("2018-01-01") },
23
- { yearLabel: "19", date: new Date("2019-01-01") },
24
- { yearLabel: "20", date: new Date("2020-01-01") },
25
- { yearLabel: "21", date: new Date("2021-01-01") },
19
+ { yearLabel: "18", date: new Date("2018-01-01T00:00:00+01:00") },
20
+ { yearLabel: "19", date: new Date("2019-01-01T00:00:00+01:00") },
21
+ { yearLabel: "20", date: new Date("2020-01-01T00:00:00+01:00") },
22
+ { yearLabel: "21", date: new Date("2021-01-01T00:00:00+01:00") },
26
23
  ]);
27
24
  });