@kirz/react-native-toolkit
Version:
Toolkit to speed up React Native development
20 lines (19 loc) • 430 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.parseIso8601Period = parseIso8601Period;
const androidPeriods = {
D: 'day',
W: 'week',
M: 'month',
Y: 'year'
};
function parseIso8601Period(period) {
return {
// @ts-ignore
periodUnit: androidPeriods[period.charAt(2)],
numberOfPeriods: parseInt(period.charAt(1), 10)
};
}
//# sourceMappingURL=parseIso8601Period.js.map