ivue-material-plus
Version:
A high quality UI components Library with Vue.js
16 lines (13 loc) • 396 B
JavaScript
import Pad from './pad.mjs';
var MonthChange = (value, sign) => {
const [year, month] = String(value).split("-").map((v) => 1 * v);
if (month + sign === 0) {
return `${year - 1}-12`;
} else if (month + sign === 13) {
return `${year + 1}-01`;
} else {
return `${year}-${Pad(month + sign)}`;
}
};
export { MonthChange as default };
//# sourceMappingURL=month-change.mjs.map