Laravel Carbon Macros
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
- Brazil 🇧🇷
- France 🇫🇷
- Germany 🇩🇪
- India 🇮🇳
- Indonesia 🇮🇩
- Italy 🇮🇹
- Kenya 🇰🇪
- Netherlands 🇳🇱
- Sweden 🇸🇪
- Ukraine 🇺🇦
- Zambia 🇿🇲
- Algeria 🇩🇿
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