@momo-kits/calendar 0.169.7-beta.3 → 0.169.7

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/MonthList.tsx CHANGED
@@ -26,9 +26,6 @@ const MAX_RENDER_PER_BATCH = Platform.OS === 'android' ? 1 : 12;
26
26
  // @ts-ignore
27
27
  const converter = new LunarDateConverter();
28
28
 
29
- /**
30
- * True when `a` and `b` fall in the same month of the same year.
31
- */
32
29
  const isSameMonth = (a: Moment, b: Moment) => {
33
30
  return a.year() === b.year() && a.month() === b.month();
34
31
  };
package/Util.ts CHANGED
@@ -13,17 +13,14 @@ const Solar = (momentDate: moment.Moment) => ({
13
13
  solarYear: momentDate.year(),
14
14
  });
15
15
 
16
- /** Day or month as two digits, zero-padded: 5 → `05`. */
17
16
  const padTwoDigits = (value: number) => {
18
17
  return value < 10 ? `0${value}` : `${value}`;
19
18
  };
20
19
 
21
- /** `YYYY-MM-DD`, zero-padded ISO so `moment()` parses it without a format. */
22
- const formatYYYYMMDD = (dd: number, mm: number, yyyy: number) => {
20
+ const formatYYYYMMDD = (dd: number, mm: number, yyyy: any) => {
23
21
  return `${yyyy}-${padTwoDigits(mm)}-${padTwoDigits(dd)}`;
24
22
  };
25
23
 
26
- /** Zero-padded `DD/MM`, the key holidays are grouped by. */
27
24
  const formatDDMM = (dd: number, mm: number) => {
28
25
  return `${padTwoDigits(dd)}/${padTwoDigits(mm)}`;
29
26
  };
@@ -123,7 +120,7 @@ const Utils = {
123
120
  if (holiday.solar[headerInfo.month() + 1]) {
124
121
  // @ts-ignore
125
122
  holiday.solar[headerInfo.month() + 1].forEach(
126
- (date: { month: number; day: number }) => {
123
+ (date: { month: number; day: any }) => {
127
124
  const dateAsMoment = moment({
128
125
  year: headerInfo.year(),
129
126
  month: date.month - 1,
@@ -136,7 +133,7 @@ const Utils = {
136
133
  );
137
134
  }
138
135
 
139
- holiday.lunar.forEach(item => {
136
+ holiday.lunar.forEach((item: { lunarDay: any; lunarMonth: any }) => {
140
137
  if (currentYear instanceof Array) {
141
138
  const solar1 = converter.LunarToSolar({
142
139
  lunarDay: item.lunarDay,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/calendar",
3
- "version": "0.169.7-beta.3",
3
+ "version": "0.169.7",
4
4
  "private": false,
5
5
  "main": "index.tsx",
6
6
  "peerDependencies": {