react-native-easy-calendar
Version:
Customizable, easy-to-use, performant calendar components for React Native
19 lines (17 loc) • 505 B
JavaScript
import dayjs from 'dayjs';
const getSurroundingTimeUnits = visibleDate => {
const month = {
next: dayjs(visibleDate).startOf('month').add(1, 'month'),
last: dayjs(visibleDate).endOf('month').subtract(1, 'month')
};
const year = {
next: dayjs(visibleDate).startOf('year').add(1, 'year'),
last: dayjs(visibleDate).endOf('year').subtract(1, 'year')
};
return {
year,
month
};
};
export default getSurroundingTimeUnits;
//# sourceMappingURL=getSurroundingTimeUnits.js.map