Files
2026-05-30 19:59:39 -03:00

14 lines
295 B
JavaScript

import { toJalali } from "../_lib/jalali.js";
/**
*
* @param cleanDate {Date}
* @returns {number}
*/
export function getMonth(cleanDate) {
const gd = cleanDate.getDate();
const gm = cleanDate.getMonth() + 1;
const gy = cleanDate.getFullYear();
return toJalali(gy, gm, gd).jm - 1;
}