@momo-kits/calendar 0.169.7-beta.2 → 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 +0 -3
- package/Util.ts +1 -4
- package/package.json +1 -1
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
|
-
|
|
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
|
};
|