https://github.com/defstudio/supercharged-carbon
https://github.com/defstudio/supercharged-carbon
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/defstudio/supercharged-carbon
- Owner: defstudio
- Created: 2021-02-18T16:28:20.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-18T12:15:27.000Z (almost 2 years ago)
- Last Synced: 2025-09-26T11:58:38.323Z (8 months ago)
- Language: PHP
- Size: 34.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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:
```php
$date->isHoliday()
```
should be changed to:
```php
!$date->isWorkday()
```
or
```php
$date->isHoliday() || $date->isWeekend()
```