UEA-Prodem

This commit is contained in:
2026-06-10 12:38:42 -03:00
parent 3f33154e16
commit c41625e542
9352 changed files with 1128292 additions and 14752 deletions
+15
View File
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.setYear = setYear;
const conversion_js_1 = require("../utils/conversion.js");
const daysInMonth_js_1 = require("../utils/daysInMonth.js");
function setYear(date, year) {
const hijri = (0, conversion_js_1.toHijriDate)(date);
const daysInTargetMonth = (0, daysInMonth_js_1.getDaysInMonth)(year, hijri.monthIndex);
const day = Math.min(hijri.day, daysInTargetMonth);
return (0, conversion_js_1.toGregorianDate)({
year,
monthIndex: hijri.monthIndex,
day,
});
}