PHP code example of phdevutils / dates
1. Go to this page and download the library: Download phdevutils/dates library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
phdevutils / dates example snippets
use PhDevUtils\Dates\{BusinessDays, Format};
BusinessDays::isBusinessDay('2026-05-25'); // true (Monday)
BusinessDays::isBusinessDay('2026-12-25'); // false (Christmas)
BusinessDays::addBusinessDays('2026-12-23', 1); // '2026-12-28' (skips Christmas Eve + Christmas + weekend)
BusinessDays::businessDaysBetween('2026-12-21', '2026-12-31'); // 5
Format::filipino('2026-05-25'); // 'Lunes, 25 ng Mayo 2026'
Format::filipino('2026-05-25', ['style' => 'short']); // 'Lun, 25 Mayo 2026'
Format::month(5); // 'Mayo'
Format::day(1); // 'Lunes'