PHPackages                             softcreatr/polyfill-calendar - 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. softcreatr/polyfill-calendar

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

softcreatr/polyfill-calendar
============================

PHP Polyfill for the Calendar extension

1.0.0(5mo ago)02MITPHPPHP &gt;=8.1CI passing

Since Jan 10Pushed 5mo agoCompare

[ Source](https://github.com/SoftCreatR/polyfill-calendar)[ Packagist](https://packagist.org/packages/softcreatr/polyfill-calendar)[ Fund](https://ecologi.com/softcreatr?r=61212ab3fc69b8eb8a2014f4)[ GitHub Sponsors](https://github.com/softcreatr)[ RSS](/packages/softcreatr-polyfill-calendar/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

polyfill-calendar
=================

[](#polyfill-calendar)

[![Build](https://camo.githubusercontent.com/fa8772baa70c047bf1245f162caa44dc5758754c4a32ba6732fd210e3b22dfc7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f536f66744372656174522f706f6c7966696c6c2d63616c656e6461722f2e6769746875622f776f726b666c6f77732f63692e796d6c3f6272616e63683d6d61696e)](https://github.com/SoftCreatR/polyfill-calendar/actions/workflows/Test.yml) [![Latest Release](https://camo.githubusercontent.com/edeed89dbeb9a84bd2ca54af7d0572c03dea2f24bda7d6a0b5fd9d0bd1c39f69/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f536f66744372656174522f706f6c7966696c6c2d63616c656e6461723f636f6c6f723d626c7565266c6162656c3d4c617465737425323052656c65617365)](https://packagist.org/packages/SoftCreatR/polyfill-calendar)[![MIT licensed](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](./LICENSE) [![Plant Tree](https://camo.githubusercontent.com/e751d267acfa70a4be08989f626ff706c90cec4e0ab98940e620250f26a991be/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f64796e616d69632f6a736f6e3f636f6c6f723d627269676874677265656e266c6162656c3d506c616e74253230547265652671756572793d2532342e746f74616c2675726c3d68747470732533412532462532467075626c69632e65636f6c6f67692e636f6d2532467573657273253246736f66746372656174722532467472656573)](https://ecologi.com/softcreatr?r=61212ab3fc69b8eb8a2014f4)[![Codecov branch](https://camo.githubusercontent.com/ab0eea0e44e79db8ee33318c5a4db400700f60a6748ade56f3ba2673b3793dce/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f536f66744372656174522f706f6c7966696c6c2d63616c656e646172)](https://codecov.io/gh/SoftCreatR/polyfill-calendar)

A precision-grade polyfill for PHP's `ext/calendar`. Built from php-src sources and tuned for behavioral parity across PHP 8.1 - 8.5.

This is a maintained fork of `roukmoute/polyfill-calendar` that focuses on complete feature coverage, strict compatibility, and predictable runtime behavior. The public namespace remains `Roukmoute\Polyfill\Calendar` to preserve drop-in compatibility.

Why this exists
---------------

[](#why-this-exists)

- Full `ext/calendar` function surface for PHP 8.1 - 8.5.
- php-src aligned logic, including validation, overflow guards, and edge cases.
- Drop-in: functions are defined only when the extension is missing.
- Deterministic timezone resolution that mirrors the extension.
- Strict types and comprehensive tests.

Installation
------------

[](#installation)

```
composer require softcreatr/polyfill-calendar
```

Usage
-----

[](#usage)

### Global functions (drop-in)

[](#global-functions-drop-in)

The Composer autoloader registers the polyfill functions when `ext/calendar`is not available.

```
