Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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



Hanif Hefaz