PHPackages                             phdevutils/dates - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. phdevutils/dates

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

phdevutils/dates
================

Philippine date utilities — business-day arithmetic (PH holiday-aware) and Filipino (Tagalog) date formatting. Companion to phdevutils/core.

v0.1.1(1mo ago)03MITPHPPHP &gt;=8.2

Since May 25Pushed 1mo agoCompare

[ Source](https://github.com/kon2raya24/ph-dates-php)[ Packagist](https://packagist.org/packages/phdevutils/dates)[ RSS](/packages/phdevutils-dates/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

phdevutils/dates
================

[](#phdevutilsdates)

[![Packagist version](https://camo.githubusercontent.com/79033abfff72bd9dee132a741ca2ea529e4a0fed91cfc44f7535adc742f32de3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70686465767574696c732f64617465733f6c6162656c3d5061636b616769737426636f6c6f723d663238643161266c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465)](https://packagist.org/packages/phdevutils/dates)[![npm version](https://camo.githubusercontent.com/024f3013c7fabb044afe6cee5c15d99d5a6cb71d7cb12fd52dc44b3698771ed3/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f4070682d6465762d7574696c732f64617465733f6c6162656c3d6e706d26636f6c6f723d636233383337266c6f676f3d6e706d)](https://www.npmjs.com/package/@ph-dev-utils/dates)[![License: MIT](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://github.com/kon2raya24/ph-dates/blob/main/LICENSE)[![Made in PH](https://camo.githubusercontent.com/e9d62429053ae0e0e8db5071df8eaba9a45ad7f91130696a66262598b44094e5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d616465253230696e2d2546302539462538372542352546302539462538372541442532305068696c697070696e65732d303033384138)](https://github.com/kon2raya24)

**Philippine date utilities for PHP + JS** — business-day arithmetic (PH holiday-aware) and Filipino (Tagalog) date formatting. Companion to [phdevutils/core](https://github.com/kon2raya24/ph-dev-utils) (uses its bundled 2025–2026 PH holiday calendar).

```
composer require phdevutils/dates
```

Why
---

[](#why)

Every PH HR / leave / cutoff / accounting / SLA app hits the same problem: "what date is N business days from today, skipping weekends *and* the PH holiday calendar?" — and the late-December gauntlet (Christmas Eve, Christmas, Rizal Day, New Year's Eve all in one stretch) is where naive implementations break. This package gets that right out of the box.

PHP usage
---------

[](#php-usage)

```
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'
```

JS usage
--------

[](#js-usage)

A parity JavaScript/TypeScript package is published as [`@ph-dev-utils/dates`](https://www.npmjs.com/package/@ph-dev-utils/dates):

```
import { isBusinessDay, addBusinessDays, businessDaysBetween, formatFilipino } from '@ph-dev-utils/dates';

addBusinessDays('2026-12-23', 1);                  // '2026-12-28'
businessDaysBetween('2026-12-21', '2026-12-31');   // 5
formatFilipino('2026-05-25');                      // 'Lunes, 25 ng Mayo 2026'
```

Options for business-day functions
----------------------------------

[](#options-for-business-day-functions)

- `saturdayIsBusinessDay` / `sundayIsBusinessDay` — for 6- or 7-day workweeks (default false)
- `extraNonBusinessDates` — company-specific shutdown days
- `excludeSpecialWorking` — also exclude "special working" proclaimed days (NOT excluded by default — those are normal work days at 100% pay)

Date type handling
------------------

[](#date-type-handling)

Public APIs accept either ISO `YYYY-MM-DD` strings or native `DateTimeInterface`. Internally everything is normalized to ISO strings to avoid timezone foot-guns. Functions return ISO strings — wrap them in your call site if you need richer types.

⚠️ "Special working" days
-------------------------

[](#️-special-working-days)

PH proclaims some days as "special working" (work proceeds at 100% pay, no premium) — e.g. Holy Saturday some years, or specific local holidays. They ARE business days by default. Set `excludeSpecialWorking: true` if your business actually closes on them.

License
-------

[](#license)

MIT

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance89

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

2

Last Release

58d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ea8892a6c7ba804d12cac27e5927f4b7695d3fc63fec0ecd512d07c117246d6a?d=identicon)[kon2raya24](/maintainers/kon2raya24)

---

Top Contributors

[![kon2raya24](https://avatars.githubusercontent.com/u/167972097?v=4)](https://github.com/kon2raya24 "kon2raya24 (2 commits)")

---

Tags

business-dayscomposerholidaysphilippinesphpdatesholidaysphilippinesbusiness daystagalogfilipino

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/phdevutils-dates/health.svg)

```
[![Health](https://phpackages.com/badges/phdevutils-dates/health.svg)](https://phpackages.com/packages/phdevutils-dates)
```

###  Alternatives

[simshaun/recurr

PHP library for working with recurrence rules

1.6k17.2M54](/packages/simshaun-recurr)[spatie/holidays

Calculate public holidays

402860.1k2](/packages/spatie-holidays)[umulmrum/holiday

A PHP library to compute holidays. It's something :-)

93385.8k1](/packages/umulmrum-holiday)[geoffreyrose/us-holidays

US Holidays Wrapper for the Carbon DateTime Library.

62769.6k3](/packages/geoffreyrose-us-holidays)[holidayapi/holidayapi-php

Official PHP library for Holiday API

35235.7k1](/packages/holidayapi-holidayapi-php)[citco/carbon

This is a wrapper for nesbot/carbon which also calculates which days are British bank holidays (England &amp; Wales only).

17419.7k5](/packages/citco-carbon)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
