@timardex/cluemart-shared 1.5.494 → 1.5.495

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.
package/dist/index.mjs CHANGED
@@ -435,6 +435,7 @@ var priceUnits = [
435
435
 
436
436
  // src/utils/dailyClueGame.ts
437
437
  import dayjs from "dayjs";
438
+ import utc from "dayjs/plugin/utc";
438
439
 
439
440
  // src/types/game.ts
440
441
  var gameScreenIdentifierList = [
@@ -526,6 +527,7 @@ var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
526
527
  })(EnumGameStatus || {});
527
528
 
528
529
  // src/utils/dailyClueGame.ts
530
+ dayjs.extend(utc);
529
531
  function createSeededRng(seed) {
530
532
  let t = seed >>> 0;
531
533
  return function random() {
@@ -554,7 +556,7 @@ function seededShuffle(array6, seed) {
554
556
  return result;
555
557
  }
556
558
  function getDayIndex(startDate) {
557
- return dayjs().startOf("day").diff(dayjs(startDate).startOf("day"), "day");
559
+ return dayjs().utc().startOf("day").diff(dayjs(startDate).utc().startOf("day"), "day");
558
560
  }
559
561
  function computeDailyClueState(dailyClue) {
560
562
  const { startDate, endDate } = dailyClue.gameFields.gameDate;
@@ -563,9 +565,9 @@ function computeDailyClueState(dailyClue) {
563
565
  gameScreenIdentifierList,
564
566
  startDate.toISOString()
565
567
  );
566
- const today = dayjs().startOf("day");
567
- const start = dayjs(startDate).startOf("day");
568
- const end = dayjs(endDate).startOf("day");
568
+ const today = dayjs().utc().startOf("day");
569
+ const start = dayjs(startDate).utc().startOf("day");
570
+ const end = dayjs(endDate).utc().startOf("day");
569
571
  if (today.isBefore(start)) {
570
572
  return null;
571
573
  }
@@ -603,11 +605,11 @@ import dayjs2 from "dayjs";
603
605
  import customParseFormat from "dayjs/plugin/customParseFormat.js";
604
606
  import isSameOrAfter from "dayjs/plugin/isSameOrAfter.js";
605
607
  import timezone from "dayjs/plugin/timezone.js";
606
- import utc from "dayjs/plugin/utc.js";
608
+ import utc2 from "dayjs/plugin/utc.js";
607
609
  var dateFormat = "DD-MM-YYYY";
608
610
  var timeFormat = "HH:mm";
609
611
  dayjs2.extend(customParseFormat);
610
- dayjs2.extend(utc);
612
+ dayjs2.extend(utc2);
611
613
  dayjs2.extend(timezone);
612
614
  dayjs2.extend(isSameOrAfter);
613
615
  var NZ_TZ = "Pacific/Auckland";