@momo-kits/calendar 0.0.46-beta.66 → 0.0.46-beta.67
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/package.json +1 -1
- package/src/MonthList.js +8 -7
package/package.json
CHANGED
package/src/MonthList.js
CHANGED
|
@@ -8,10 +8,12 @@ import {
|
|
|
8
8
|
import moment from 'moment';
|
|
9
9
|
import Month from './Month';
|
|
10
10
|
import style from './Day/style';
|
|
11
|
-
import
|
|
11
|
+
import LunarDateConverter from './LunarDateConverter';
|
|
12
12
|
|
|
13
13
|
const ITEM_WIDTH = Dimensions.get('window').width - 24;
|
|
14
14
|
const MAX_RENDER_PER_BATCH = Platform.OS === 'android' ? 1 : 12;
|
|
15
|
+
|
|
16
|
+
const converter = new LunarDateConverter();
|
|
15
17
|
export default class MonthList extends Component {
|
|
16
18
|
constructor(props) {
|
|
17
19
|
super(props);
|
|
@@ -76,12 +78,11 @@ export default class MonthList extends Component {
|
|
|
76
78
|
};
|
|
77
79
|
|
|
78
80
|
convertLunarToSolar(date) {
|
|
79
|
-
return date
|
|
80
|
-
date.date(),
|
|
81
|
-
date.month() + 1,
|
|
82
|
-
date.year()
|
|
83
|
-
|
|
84
|
-
) : {};
|
|
81
|
+
return date ? converter.SolarToLunar({
|
|
82
|
+
solarDay: date.date(),
|
|
83
|
+
solarMonth: date.month() + 1,
|
|
84
|
+
solarYear: date.year()
|
|
85
|
+
}) : {};
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
findHoliday = (date) => {
|