date-fns-holiday-us
v1.1.0
Published
The purpose of this project is to give an interface to work with holidays using date-fns
Downloads
23,928
Maintainers
Readme
date-fns-holiday-us
The purpose of this project is to give an interface to work with holidays using date-fns
Install
yarn add date-fns-holiday-us date-fns
or with npm:
npm i date-fns-holiday-us date-fns
Table of contents
Type Aliases
Functions
- getBankHolidays
- getChristmas
- getColumbusDay
- getEaster
- getFathersDay
- getGoodFriday
- getHalloween
- getHolidays
- getIndependenceDay
- getJuneteenth
- getLaborDay
- getMartinLutherKingJrDay
- getMemorialDay
- getMothersDay
- getNewYearsDay
- getNewYearsEve
- getObservedHolidays
- getPresidentsDay
- getThanksgiving
- getValentinesDay
- getVeteransDay
- isBankHoliday
- isHoliday
- isInHolidayList
Type Aliases
Holiday
Ƭ Holiday: "christmas"
| "easter"
| "halloween"
| "valentinesDay"
| "mothersDay"
| "columbusDay"
| "independenceDay"
| "presidentsDay"
| "laborDay"
| "veteransDay"
| "thanksgiving"
| "newYearsEve"
| "martinLutherKingJrDay"
| "newYearsDay"
| "fathersDay"
| "memorialDay"
| "goodFriday"
| "juneteenth"
Defined in
Holidays
Ƭ Holidays: { [K in Holiday]: Object }
Defined in
Functions
getBankHolidays
▸ getBankHolidays(year
): Object
Parameters
| Name | Type |
| :------ | :------ |
| year
| number
|
Returns
Object
Defined in
getChristmas
▸ getChristmas(year
): Date
Parameters
| Name | Type |
| :------ | :------ |
| year
| number
|
Returns
Date
Defined in
getColumbusDay
▸ getColumbusDay(year
): Date
Parameters
| Name | Type |
| :------ | :------ |
| year
| number
|
Returns
Date
Defined in
getEaster
▸ getEaster(year
): Date
Parameters
| Name | Type |
| :------ | :------ |
| year
| number
|
Returns
Date
Defined in
getFathersDay
▸ getFathersDay(year
): Date
Parameters
| Name | Type |
| :------ | :------ |
| year
| number
|
Returns
Date
Defined in
getGoodFriday
▸ getGoodFriday(year
): Date
Parameters
| Name | Type |
| :------ | :------ |
| year
| number
|
Returns
Date
Defined in
getHalloween
▸ getHalloween(year
): Date
Parameters
| Name | Type |
| :------ | :------ |
| year
| number
|
Returns
Date
Defined in
getHolidays
▸ getHolidays(year
): Holidays
Parameters
| Name | Type |
| :------ | :------ |
| year
| number
|
Returns
Defined in
getIndependenceDay
▸ getIndependenceDay(year
): Date
Parameters
| Name | Type |
| :------ | :------ |
| year
| number
|
Returns
Date
Defined in
getJuneteenth
▸ getJuneteenth(year
): Date
Parameters
| Name | Type |
| :------ | :------ |
| year
| number
|
Returns
Date
Defined in
getLaborDay
▸ getLaborDay(year
): Date
Parameters
| Name | Type |
| :------ | :------ |
| year
| number
|
Returns
Date
Defined in
getMartinLutherKingJrDay
▸ getMartinLutherKingJrDay(year
): Date
Parameters
| Name | Type |
| :------ | :------ |
| year
| number
|
Returns
Date
Defined in
getMemorialDay
▸ getMemorialDay(year
): Date
Parameters
| Name | Type |
| :------ | :------ |
| year
| number
|
Returns
Date
Defined in
getMothersDay
▸ getMothersDay(year
): Date
Parameters
| Name | Type |
| :------ | :------ |
| year
| number
|
Returns
Date
Defined in
getNewYearsDay
▸ getNewYearsDay(year
): Date
Parameters
| Name | Type |
| :------ | :------ |
| year
| number
|
Returns
Date
Defined in
getNewYearsEve
▸ getNewYearsEve(year
): Date
Parameters
| Name | Type |
| :------ | :------ |
| year
| number
|
Returns
Date
Defined in
getObservedHolidays
▸ getObservedHolidays(year
): Record
<string
, Record
<"date"
, Date
>>
Parameters
| Name | Type |
| :------ | :------ |
| year
| number
|
Returns
Record
<string
, Record
<"date"
, Date
>>
Defined in
getPresidentsDay
▸ getPresidentsDay(year
): Date
Parameters
| Name | Type |
| :------ | :------ |
| year
| number
|
Returns
Date
Defined in
getThanksgiving
▸ getThanksgiving(year
): Date
Parameters
| Name | Type |
| :------ | :------ |
| year
| number
|
Returns
Date
Defined in
getValentinesDay
▸ getValentinesDay(year
): Date
Parameters
| Name | Type |
| :------ | :------ |
| year
| number
|
Returns
Date
Defined in
getVeteransDay
▸ getVeteransDay(year
): Date
Parameters
| Name | Type |
| :------ | :------ |
| year
| number
|
Returns
Date
Defined in
isBankHoliday
▸ isBankHoliday(date
): boolean
Parameters
| Name | Type |
| :------ | :------ |
| date
| Date
|
Returns
boolean
Defined in
isHoliday
▸ isHoliday(date
): boolean
Parameters
| Name | Type |
| :------ | :------ |
| date
| Date
|
Returns
boolean
Defined in
isInHolidayList
▸ isInHolidayList(date
, getHolidayList
): boolean
Parameters
| Name | Type |
| :------ | :------ |
| date
| Date
|
| getHolidayList
| (year
: number
) => { [key: string]
: { date
: Date
}; } |
Returns
boolean
Defined in
© 2020 Jon Stuebe