defstudio / supercharged-carbon
A supercharged Carbon decorator
Installs: 9 142
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: ^8.0
- illuminate/support: ^8.0|^9.0|^10.0
- nesbot/carbon: ^2.31
README
Carbon helper function
carbon('2018-04-18')
returns a carbon instance
- addWorkdays($count): self
- isHoliday()
- isWorkday()
italians holidays
- isLiberationDay()
- isRepublicDay()
- isImmaculateConceptionFeast()
- isAssumptionOfMaryFeast()
- isEpiphany()
- isDayBeforeChristmas()
- isChristmas()
- isSaintStephenDay()
- isSaintSylvesterDay()
- isWorkersDay()
- isEasterDay()
- isEasterMonday()
Upgrading
v1.x → v2.x
->isHoliday()
does not answer true
for Saturdays and Sundays, so, to obtain the same result as in v1.x this:
$date->isHoliday()
should be changed to:
!$date->isWorkday()
or
$date->isHoliday() || $date->isWeekend()