defstudio/supercharged-carbon

A supercharged Carbon decorator

Installs: 10 479

Dependents: 2

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

pkg:composer/defstudio/supercharged-carbon

v3.0.1 2026-01-30 14:42 UTC

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()