peace2643/indonesian-holidays
最新稳定版本:v1.0.0
Composer 安装命令:
composer require peace2643/indonesian-holidays
包简介
Simple package to check Indonesian public holidays
README 文档
README
Simple package to check Indonesian public holidays.
Credit
Data is sourced from the awesome web at tanggalans.id. Terima kasih!
License
MIT License
Installation
composer require peace2643/indonesian-holidays Usage <?php require 'vendor/autoload.php'; use peace2643\IndonesianHolidays\IndonesianHolidays; $holidays = new IndonesianHolidays(); // Check if today is a holiday $today = $holidays->isToday(); if ($today) { echo "Today is: " . $today; } else { echo "Today is not a holiday"; } // Check if tomorrow is a holiday $tomorrow = $holidays->isTomorrow(); if ($tomorrow) { echo "Tomorrow is: " . $tomorrow; } // Get all holidays this month $thisMonth = $holidays->isThisMonth(); print_r($thisMonth); // Get next holiday $next = $holidays->getNext(); if ($next) { echo "Next holiday: " . $next['name'] . " on " . $next['date']; } Available Methods isToday() - Check if today is a holiday isYesterday() - Check if yesterday was a holiday isTomorrow() - Check if tomorrow is a holiday isHoliday($date) - Check specific date isThisMonth() - Get all holidays this month isThisYear() - Get all holidays this year getAllHolidays() - Get all holidays getNext() - Get next upcoming holiday
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-07-31