1.0.0 • Published 2 years ago
capycalendar v1.0.0
CapyCalendar Library
CapyCalendar is a JavaScript library that provides utilities for working with dates and calendars. It allows you to calculate the number of days in a specific month, check if a year is a leap year, and more. Made with love by capybaras <3
Installation
You can install CapyCalendar using npm:
npm install capycalendarUsage
const capycalendar = require('capycalendar');Get Days in a Month
You can use the getDaysInMonth function to calculate the number of days in a specific month:
const daysInMarch2023 = capycalendar.getDaysInMonth(2023, 3);
console.log(daysInMarch2023); // Output: 31Check if a Year is a Leap Year
const is2024LeapYear = capycalendar.isLeapYear(2024);
console.log(is2024LeapYear); // Output: trueAPI Reference
getDaysInMonth(year, month)
Calculate the number of days in a specific month.
'year' (number): The year (e.g., 2023). This parameter is optional
'month' (number): The month (1 to 12).
Returns the number of days in the specified month.
Contributing
Contributions to CapyCalendar are welcome! If you have any bug fixes, improvements, or new features, feel free to open a pull request ^^
Origin
1.0.0
2 years ago