@qvant/qui-max
Version:
A Vue 3 Design system for Web.
15 lines (14 loc) • 506 B
JavaScript
import toDate from "../toDate/index.js";
import requiredArgs from "../_lib/requiredArgs/index.js";
function getDaysInMonth(dirtyDate) {
requiredArgs(1, arguments);
var date = toDate(dirtyDate);
var year = date.getFullYear();
var monthIndex = date.getMonth();
var lastDayOfMonth = new Date(0);
lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);
lastDayOfMonth.setHours(0, 0, 0, 0);
return lastDayOfMonth.getDate();
}
export { getDaysInMonth as default };
//# sourceMappingURL=index.js.map