https://github.com/warcooft/dayoff
Indonesian National Dayoffs is a simple and handy package to help you fetch and display public holiday information in your CodeIgniter 4 application.
https://github.com/warcooft/dayoff
codeigniter4 php8
Last synced: 4 months ago
JSON representation
Indonesian National Dayoffs is a simple and handy package to help you fetch and display public holiday information in your CodeIgniter 4 application.
- Host: GitHub
- URL: https://github.com/warcooft/dayoff
- Owner: warcooft
- License: mit
- Created: 2025-05-20T10:37:44.000Z (about 1 year ago)
- Default Branch: develop
- Last Pushed: 2025-05-26T08:03:43.000Z (about 1 year ago)
- Last Synced: 2025-12-18T11:24:05.514Z (6 months ago)
- Topics: codeigniter4, php8
- Language: PHP
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🇮🇩 Indonesian National Dayoffs
Indonesian National Dayoffs is a simple and handy package to help you fetch and display public holiday information in your CodeIgniter 4 application.


## Installation
Use Composer to install the package:
```
composer require aselsan/dayoff dev-develop
```
## Migration
Run the following migration to create the necessary database tables:
```
php spark migrate --all
```
## Fetch Holiday Data
To scrape Indonesian public holiday data, use the custom CLI command:
```
php spark scrap:dayoff --year 2025
```
Or simply run without the --year option to fetch holidays for the current year:
```
php spark scrap:dayoff
```
## Available Methods
```php
now(); // Check if today is a holiday
service('dayoff')->yesterday(); // Get holiday info for yesterday
service('dayoff')->tomorrow(); // Get holiday info for tomorrow
service('dayoff')->thisWeek(); // Get holidays in the current week
service('dayoff')->thisMonth(); // Get holidays in the current month
service('dayoff')->thisYear(); // Get holidays in the current year
```
## Credit
Data is sourced from the awesome web at www.tanggalan.com. Terima kasih!
## License
This project is licensed under the MIT License - see the [LICENSE](/LICENSE) file for details.