Skip to content

Commit

Permalink
feat(daysInMonth): add daysInMonth function
Browse files Browse the repository at this point in the history
  • Loading branch information
djcsdy committed Jan 26, 2024
1 parent 0a46ec4 commit fb7298e
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,18 @@ export const DECEMBER = date.DECEMBER; // eslint-disable-line @typescript-eslint
*
* Note that there is no year zero in the Gregorian calendar. The year
* 1 BCE was immediately followed by 1 CE. */
export const isLeapYear = date.isLeapYear;
export const isLeapYear = date.isLeapYear;

/** Returns the number of days in the specified month in the specified year.
*
* @param month - An integer representing the month, in the range `1` (January)
* to `12` (December).
*
* @param year - An integer representing the year. Positive values represent
* years in the Common Era (CE/AD). For example `2020` represents 2020 CE,
* the year this module was first published to npm. Negative values or zero
* represent years before the Common Era (BCE/BC). Zero represents 1 BCE,
* `-1` represents 2 BCE, `-2` represents 3 BCE, etc. There is no year zero
* in the Gregorian calendar. The year 1 BCE was immediately followed by 1
* CE. */
export const daysInMonth = date.daysInMonth;

0 comments on commit fb7298e

Please sign in to comment.