react-day-picker / src /ethiopic /lib /getMonth.ts
AbdulElahGwaith's picture
Upload folder using huggingface_hub
cf86710 verified
import { toEthiopicDate } from "../utils/index.js";
/**
* Get month
*
* @param {Date} date - The original date
* @returns {number} The zero-based month index
*/
export function getMonth(date: Date): number {
const { month } = toEthiopicDate(date);
return month - 1; // Return zero-based month index
}