hussainweb/date-converter

DateConverter is a PHP library to convert dates from and to various calendar systems.

v1.0.0 2022-09-24 06:54 UTC

This package is auto-updated.

Last update: 2024-12-24 11:35:46 UTC


README

Latest Version Software License Build Status Total Downloads

Date Converter is a PHP library to convert dates across various calendars. Currently, support for only various Hijri calendars is planned.

Install

Via Composer

composer require hussainweb/date-converter

Usage

To convert between dates, use the respective Algorithm class. Similar to PHP's in-built date conversion functions, these classes work with Julian Day as a primary means to convert dates.

$algorithm = new HijriFatimidAstronomical();
$hijri_date = $algorithm->fromJulianDay(2457198); // 8-9-1436