roukmoute/polyfill-calendar

PHP Polyfill for the Calendar extension

v0.5.0 2022-08-14 10:03 UTC

This package is auto-updated.

Last update: 2024-04-14 13:43:26 UTC


README

This project backports features found in the calendar extension.
It is intended to be used when calendar extension is not enabled.

Currently, functions available are:

  • cal_to_jd — Converts from a supported calendar to Julian Day Count
  • easter_date — Get Unix timestamp for midnight on Easter of a given year
  • easter_days — Get number of days after March 21 on which Easter falls for a given year
  • jdtogregorian — Converts Julian Day Count to Gregorian date
  • jewishtojd — Converts a date in the Jewish Calendar to Julian Day Count
  • juliantojd — Converts a Julian Calendar date to Julian Day Count

Usage

Installation

composer require roukmoute/polyfill-calendar

License

This library is released under the MIT license.