hussainweb / date-converter
DateConverter is a PHP library to convert dates from and to various calendar systems.
Installs: 1 084
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 4
Forks: 1
Open Issues: 2
Requires
- php: ^7.4 | ^8.0
Requires (Dev)
- phpunit/phpunit: ^9
- squizlabs/php_codesniffer: ^3.7
This package is auto-updated.
Last update: 2024-12-24 11:35:46 UTC
README
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