Download the PHP package geoffreyrose/us-holidays without Composer
On this page you can find all versions of the php package geoffreyrose/us-holidays. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download geoffreyrose/us-holidays
More information about geoffreyrose/us-holidays
Files in geoffreyrose/us-holidays
Package us-holidays
Short Description US Holidays Wrapper for the Carbon DateTime Library.
License MIT
Informations about the package us-holidays
Carbon Support for US Holidays
This extends Carbon and adds support for 42 US holidays.
Full Documentation
v2.x
https://geoffreyrose.github.io/us-holidays/
v1.x
https://github.com/geoffreyrose/us-holidays/blob/8717adad63c489e3ef65619e4272bb9b21718078/README.md
Supported Holidays
- April Fool's Day
- Armed Forces Day
- Ash Wednesday
- Black Friday
- Christmas Day
- Christmas Eve
- Cinco de Mayo
- Columbus Day
- Cyber Monday
- Daylight Saving (End)
- Daylight Saving (Start)
- Earth Day
- Easter
- Father's Day
- Flag Day
- Good Friday
- Groundhog Day
- Halloween
- Hanukkah
- Independence Day
- Indigenous Peoples' Day
- Juneteenth
- Kwanzaa
- Labor Day
- Martin Luther King Jr. Day
- Memorial Day
- Mother's Day
- New Year's Day
- New Year's Eve
- Orthodox Easter
- Palm Sunday
- Passover
- Patriot Day
- Pearl Harbor Remembrance Day
- Presidents' Day
- Rosh Hashanah
- St. Patrick's Day
- Tax Day
- Thanksgiving
- Valentine's Day
- Veterans Day
- Yom Kippur
Requirements
- Carbon
- PHP 7.4+ | 8.0+
Usage
With Composer
Without Composer
Get Holiday By Year
See documentation for more details
Get Holiday In Days
See documentation for more details
Get Holiday In Years
See documentation for more details
Get Holiday Date
See documentation for more details
isHoliday()
See documentation for more details
Check if date is holiday. Returns boolean
isBankHoliday()
See documentation for more details
Check if date is a Bank Holiday and the day it is observed on. I.E. if the holiday falls if a holiday falls on Sunday, the holiday is observed the next day (Monday). Note: Bank holidays are Monday - Friday Only. Holidays that are always on weekends are not consider bank holidays. Also holidays that are Bank Holidays but fall on Saturday are NOT observed on the previous Friday. Returns boolean
isFederalHoliday()
See documentation for more details
Check if date is a Federal Holiday and the day it is observed on. I.E. if the holiday falls on Saturday, the holiday is observed the previous day (Friday). Or if a holiday falls on Sunday, the holiday is observed the next day (Monday). Note: Federal holidays are Monday - Friday Only. Holidays that are always on weekends are not consider bank holidays. Returns boolean
Get Holiday Name
See documentation for more details
Get name if date is holiday. Returns string
or false
Add Own Holiday
See documentation for more details
Additional Examples
Contributing
-
Clone the repo and install dependencies.
- Run Tests
Use locally installed carbon version
Test against Carbon v2
Test against Carbon v3
See It Used in the Wild
GBPN - Ongoing US Holiday Calendar
Canny Armadillo - Next 12 Months