dansoppelsa / laravel-carbon-macros
Laravel Carbon Macros
Installs: 1 442
Dependents: 0
Suggesters: 0
Security: 0
Stars: 79
Watchers: 3
Forks: 29
Open Issues: 7
Requires
- illuminate/support: >=5.5
Requires (Dev)
- orchestra/testbench: 6.*
This package is auto-updated.
Last update: 2024-10-22 23:01:22 UTC
README
A handy collection of international Illuminate\Support\Carbon
date helpers
Available Methods
Multi-National Dates
- isNewYearsDay
- isGoodFriday
- isEasterSunday
- isAllSaintsDay
- isChristmasDay
- isNewYearsEve
US Dates 🇺🇸
- isMlkJrDay
- isPresidentsDay
- isMemorialDay
- isIndependenceDay
- isLaborDay
- isColumbusDay
- isVeteransDay
- isAmericanThanksgiving
Canadian Dates 🇨🇦
- isFamilyDay
- isVictoriaDay
- isCanadaDay
- isCivicHoliday
- isLabourDay
- isCanadianThanksgiving
- isRemembranceDay
- isBoxingDay
Other Dates
- Algeria 🇩🇿
- Brazil 🇧🇷
- Egypt 🇪🇬
- France 🇫🇷
- Germany 🇩🇪
- India 🇮🇳
- Indonesia 🇮🇩
- Italy 🇮🇹
- Kenya 🇰🇪
- Netherlands 🇳🇱
- Sweden 🇸🇪
- Ukraine 🇺🇦
- Zambia 🇿🇲
Installation
Install via composer
composer require dansoppelsa/laravel-carbon-macros
Usage
<?php use Illuminate\Support\Carbon; $day = Carbon::parse('2020-12-25'); $day->isChristmasDay(); // true $day->isCanadaDay(); // false $day->isNewYearsDay(); // false