60p82u21t54k 1.1.32 → 1.1.33

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.
@@ -77,14 +77,12 @@ const getPreviousMonth = (day) => {
77
77
  date.setDate(1);
78
78
  date.setMonth(month - 1);
79
79
  date.setDate(day);
80
- date.setHours(12, 0, 0, 0);
81
80
  return getTimeZoneHours(date);
82
81
  };
83
82
  const getCurrentMonth = (day) => {
84
83
  const date = /* @__PURE__ */ new Date();
85
84
  date.setDate(1);
86
85
  date.setDate(day);
87
- date.setHours(12, 0, 0, 0);
88
86
  return getTimeZoneHours(date);
89
87
  };
90
88
  const getNextMonth = (day) => {
@@ -93,7 +91,6 @@ const getNextMonth = (day) => {
93
91
  date.setDate(1);
94
92
  date.setMonth(month + 1);
95
93
  date.setDate(day);
96
- date.setHours(12, 0, 0, 0);
97
94
  return getTimeZoneHours(date);
98
95
  };
99
96
  const getPreviousMonday = () => {
@@ -101,7 +98,6 @@ const getPreviousMonday = () => {
101
98
  const dayOfWeek = date.getDay();
102
99
  const daysToSubtract = dayOfWeek === 0 ? 6 + 7 : dayOfWeek - 1 + 7;
103
100
  date.setDate(date.getDate() - daysToSubtract);
104
- date.setHours(12, 0, 0, 0);
105
101
  return getTimeZoneHours(date);
106
102
  };
107
103
  const getThisMonday = () => {
@@ -109,7 +105,6 @@ const getThisMonday = () => {
109
105
  const dayOfWeek = date.getDay();
110
106
  const daysToSubtract = dayOfWeek === 0 ? 6 : dayOfWeek - 1;
111
107
  date.setDate(date.getDate() - daysToSubtract);
112
- date.setHours(12, 0, 0, 0);
113
108
  return getTimeZoneHours(date);
114
109
  };
115
110
  const getNextMonday = () => {
@@ -117,24 +112,20 @@ const getNextMonday = () => {
117
112
  const dayOfWeek = date.getDay();
118
113
  const daysToAdd = dayOfWeek === 0 ? 1 : 8 - dayOfWeek;
119
114
  date.setDate(date.getDate() + daysToAdd);
120
- date.setHours(12, 0, 0, 0);
121
115
  return getTimeZoneHours(date);
122
116
  };
123
- const getYesterday12PM = () => {
117
+ const getYesterday = () => {
124
118
  const date = /* @__PURE__ */ new Date();
125
119
  date.setDate(date.getDate() - 1);
126
- date.setHours(12, 0, 0, 0);
127
120
  return getTimeZoneHours(date);
128
121
  };
129
- const getToday12PM = () => {
122
+ const getToday = () => {
130
123
  const date = /* @__PURE__ */ new Date();
131
- date.setHours(12, 0, 0, 0);
132
124
  return getTimeZoneHours(date);
133
125
  };
134
- const getTomorrow12PM = () => {
126
+ const getTomorrow = () => {
135
127
  const date = /* @__PURE__ */ new Date();
136
128
  date.setDate(date.getDate() + 1);
137
- date.setHours(12, 0, 0, 0);
138
129
  return getTimeZoneHours(date);
139
130
  };
140
131
  const getRemainingTimeAndPercentage = (targetDate, previousTargetDate, nextTargetDate) => {
@@ -164,7 +155,7 @@ const getRemainingTimeAndPercentage = (targetDate, previousTargetDate, nextTarge
164
155
  percentage: progressPercentage
165
156
  };
166
157
  };
167
- const getRemainingTimestampToNextMonthFirstDay12pm = () => {
158
+ const getRemainingTimestampToNextMonthFirstDay = () => {
168
159
  const { remainingTime, percentage } = getRemainingTimeAndPercentage(
169
160
  getCurrentMonth(1),
170
161
  getPreviousMonth(1),
@@ -175,7 +166,7 @@ const getRemainingTimestampToNextMonthFirstDay12pm = () => {
175
166
  monthProgressPercentage: percentage
176
167
  };
177
168
  };
178
- const getRemainingTimestampToNextWeekMonday12pm = () => {
169
+ const getRemainingTimestampToNextWeekMonday = () => {
179
170
  const { remainingTime, percentage } = getRemainingTimeAndPercentage(
180
171
  getThisMonday(),
181
172
  getPreviousMonday(),
@@ -186,11 +177,11 @@ const getRemainingTimestampToNextWeekMonday12pm = () => {
186
177
  weekProgressPercentage: percentage
187
178
  };
188
179
  };
189
- const getRemainingTimestampToTomorrow12pm = () => {
180
+ const getRemainingTimestampToTomorrow = () => {
190
181
  const { remainingTime, percentage } = getRemainingTimeAndPercentage(
191
- getToday12PM(),
192
- getYesterday12PM(),
193
- getTomorrow12PM()
182
+ getToday(),
183
+ getYesterday(),
184
+ getTomorrow()
194
185
  );
195
186
  return {
196
187
  dayRemainingTime: remainingTime,
@@ -1651,19 +1642,19 @@ const modifyVipListResponse = (result) => {
1651
1642
  if (result == null ? void 0 : result.vipBonus) {
1652
1643
  const bonus = result.vipBonus;
1653
1644
  vipList.bonus.day.status = bonus.day.status;
1654
- const { dayRemainingTime, dayProgressPercentage } = getRemainingTimestampToTomorrow12pm();
1645
+ const { dayRemainingTime, dayProgressPercentage } = getRemainingTimestampToTomorrow();
1655
1646
  vipList.bonus.day.timestamp = {
1656
1647
  current: dayRemainingTime,
1657
1648
  percentage: dayProgressPercentage > 100 ? 100 : dayProgressPercentage
1658
1649
  };
1659
1650
  vipList.bonus.week.status = bonus.week.status;
1660
- const { weekRemainingTime, weekProgressPercentage } = getRemainingTimestampToNextWeekMonday12pm();
1651
+ const { weekRemainingTime, weekProgressPercentage } = getRemainingTimestampToNextWeekMonday();
1661
1652
  vipList.bonus.week.timestamp = {
1662
1653
  current: weekRemainingTime,
1663
1654
  percentage: weekProgressPercentage > 100 ? 100 : weekProgressPercentage
1664
1655
  };
1665
1656
  vipList.bonus.month.status = bonus.month.status;
1666
- const { monthRemainingTime, monthProgressPercentage } = getRemainingTimestampToNextMonthFirstDay12pm();
1657
+ const { monthRemainingTime, monthProgressPercentage } = getRemainingTimestampToNextMonthFirstDay();
1667
1658
  vipList.bonus.month.timestamp = {
1668
1659
  current: monthRemainingTime,
1669
1660
  percentage: monthProgressPercentage > 100 ? 100 : monthProgressPercentage