Files
echo-nexus/node_modules/react-day-picker/dist/esm/ethiopic/lib/getMonth.js
T

12 lines
300 B
JavaScript

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) {
const { month } = toEthiopicDate(date);
return month - 1; // Return zero-based month index
}