Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hanifhefaz/dcter
Converts dates between Hijri, Jalali, Gregorian and Julian
https://github.com/hanifhefaz/dcter
arabic-calendar calendar date date-converter datetime gregorian-calendar gregorian-to-jalali hijri-calendar hijri-dates-converter hijri-to-gregorian jalali-calendar jalali-to-gregorian jalali-to-hijri persian-calendar php
Last synced: 2 days ago
JSON representation
Converts dates between Hijri, Jalali, Gregorian and Julian
- Host: GitHub
- URL: https://github.com/hanifhefaz/dcter
- Owner: hanifhefaz
- License: mit
- Created: 2023-04-07T12:27:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-19T08:53:43.000Z (12 months ago)
- Last Synced: 2024-09-21T11:46:52.074Z (about 2 months ago)
- Topics: arabic-calendar, calendar, date, date-converter, datetime, gregorian-calendar, gregorian-to-jalali, hijri-calendar, hijri-dates-converter, hijri-to-gregorian, jalali-calendar, jalali-to-gregorian, jalali-to-hijri, persian-calendar, php
- Language: PHP
- Homepage: https://packagist.org/packages/hanifhefaz/dcter
- Size: 286 KB
- Stars: 24
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Dcter :calendar: Dates Converter
[![Latest Stable Version](https://img.shields.io/packagist/v/hanifhefaz/dcter.svg?style=flat-square)](https://packagist.org/packages/hanifhefaz/dcter)
[![Total Downloads](https://img.shields.io/packagist/dt/hanifhefaz/dcter.svg?style=flat-square)](https://packagist.org/packages/hanifhefaz/dcter)
[![Tests](https://github.com/hanifhefaz/dcter/actions/workflows/tests.yml/badge.svg)](https://github.com/hanifhefaz/dcter/actions/workflows/tests.yml)
[![GitHub Issues](https://img.shields.io/github/issues/hanifhefaz/dcter.svg)](https://github.com/hanifhefaz/dcter/issues)A composer package that is used to convert dates between Hijri, Jalali, Gregorian and Julian calendars.
Please consider a :star: as your support if you think this is helpful.
## :beginner: Installation
```composer require hanifhefaz/dcter```
## :question: Usage
This package currently consists of 8 methods namely, ```HijriToGregorian```, ```GregorianToHijri```, ```JulianToHijri```, ```HijriToJulian```, ```GregorianToJalali```, ```JalaliToGregorian```, ```HijriToJalali```, ```JalaliToHijri``` to convert dates to each other, and ```Carbonize``` method to make a carbon date object from any date in ```YYYY-MM-DD``` format, which comes from the popular Carbon package.
each method can be used the same way as we used the one in example, but the ```JulianToHijri``` takes the input parameter in julian format, where the output will be a hijri date and the ```HijriToJulian``` takes the input parameter as hijri date, and the output will be a julian format.
1. Jalali (Hijri Shamsi) :twisted_rightwards_arrows: Gregorian
```php