{"id":20153169,"url":"https://github.com/hanifhefaz/dcter","last_synced_at":"2025-08-29T06:26:14.651Z","repository":{"id":151824808,"uuid":"624855035","full_name":"hanifhefaz/dcter","owner":"hanifhefaz","description":"Converts dates between Hijri, Jalali, Gregorian and Julian","archived":false,"fork":false,"pushed_at":"2023-11-19T08:53:43.000Z","size":293,"stargazers_count":25,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-21T15:02:17.678Z","etag":null,"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"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/hanifhefaz/dcter","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hanifhefaz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null},"funding":{"github":["hanifhefaz"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2023-04-07T12:27:10.000Z","updated_at":"2025-07-02T17:12:45.000Z","dependencies_parsed_at":"2023-11-19T09:21:59.607Z","dependency_job_id":null,"html_url":"https://github.com/hanifhefaz/dcter","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/hanifhefaz/dcter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanifhefaz%2Fdcter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanifhefaz%2Fdcter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanifhefaz%2Fdcter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanifhefaz%2Fdcter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hanifhefaz","download_url":"https://codeload.github.com/hanifhefaz/dcter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanifhefaz%2Fdcter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272641516,"owners_count":24968802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["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"],"created_at":"2024-11-13T23:17:27.683Z","updated_at":"2025-08-29T06:26:14.612Z","avatar_url":"https://github.com/hanifhefaz.png","language":"PHP","funding_links":["https://github.com/sponsors/hanifhefaz"],"categories":[],"sub_categories":[],"readme":"# Dcter  :calendar: Dates Converter\n\n\u003cimg src=\"images/banner.jpeg\"\u003e\n\n[![Latest Stable Version](https://img.shields.io/packagist/v/hanifhefaz/dcter.svg?style=flat-square)](https://packagist.org/packages/hanifhefaz/dcter)\n[![Total Downloads](https://img.shields.io/packagist/dt/hanifhefaz/dcter.svg?style=flat-square)](https://packagist.org/packages/hanifhefaz/dcter)\n[![Tests](https://github.com/hanifhefaz/dcter/actions/workflows/tests.yml/badge.svg)](https://github.com/hanifhefaz/dcter/actions/workflows/tests.yml)\n[![GitHub Issues](https://img.shields.io/github/issues/hanifhefaz/dcter.svg)](https://github.com/hanifhefaz/dcter/issues)\n\nA composer package that is used to convert dates between Hijri, Jalali, Gregorian and Julian calendars.\n\nPlease consider a :star: as your support if you think this is helpful.\n\n## :beginner: Installation\n\n```composer require hanifhefaz/dcter``` \n\n## :question: Usage\n\nThis 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.\n\neach 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.\n\n\n1. Jalali (Hijri Shamsi) :twisted_rightwards_arrows: Gregorian\n\n```php\n\u003c?php\nuse HanifHefaz\\Dcter\\Dcter;\n\n$date = \"1401-01-16\";\n    $gregorianDate = Dcter::JalaliToGregorian($date);\n    return $gregorianDate; // returns 2022-04-05\n```\n\n2. Gregorian :twisted_rightwards_arrows: Jalali (Hijri Shamsi)\n\n```php\n\u003c?php\nuse HanifHefaz\\Dcter\\Dcter;\n\n$date = \"2023-04-08\";\n    $jalaliDate = Dcter::GregorianToJalali($date);\n    return $jalaliDate; // returns 1402-01-19\n```\n\n3. Gregorian :twisted_rightwards_arrows: Hijri (Hijri Qamari)\n\n```php\n\u003c?php\nuse HanifHefaz\\Dcter\\Dcter;\n\n$date = \"2023-04-08\";\n    $hijriDate = Dcter::GregorianToHijri($date);\n    return $hijriDate; // returns 1444-09-17\n```\n\n4. Hijri (Hijri Qamari) :twisted_rightwards_arrows: Gregorian\n\n```php\n\u003c?php\nuse HanifHefaz\\Dcter\\Dcter;\n\n$date = \"1444-09-17\";\n    $gregorianDate = Dcter::HijriToGregorian($date);\n    return $gregorianDate; // returns 2023-04-08\n```\n\n5. Hijri (Hijri Qamari) :twisted_rightwards_arrows: Julian\n\n```php\n\u003c?php\nuse HanifHefaz\\Dcter\\Dcter;\n\n$date = \"1444-09-17\";\n    $julianDate = Dcter::HijriToJulian($date);\n    return $julianDate; // returns 2460043\n```\n\n6. Julian :twisted_rightwards_arrows: Hijri (Hijri Qamari)\n\n```php\n\u003c?php\nuse HanifHefaz\\Dcter\\Dcter;\n\n$date = \"2460043\";\n    $hijriDate = Dcter::JulianToHijri($date);\n    return $hijriDate; // returns 1444-09-17\n```\n7. Hijri :twisted_rightwards_arrows: Jalali (Persian)\n\n```php\n\u003c?php\nuse HanifHefaz\\Dcter\\Dcter;\n\n$date = \"1444-09-23\";\n    $hijriDate = Dcter::HijriToJalali($date);\n    return $hijriDate; // returns 1402-01-25\n```\n8. Jalali :twisted_rightwards_arrows: Hijri (Hijri Qamari)\n\n```php\n\u003c?php\nuse HanifHefaz\\Dcter\\Dcter;\n\n$date = \"1402-01-25\";\n    $hijriDate = Dcter::JalaliToHijri($date);\n    return $hijriDate; // returns 1444-09-23\n```\n9. YYYY-MM-DD :twisted_rightwards_arrows: Carbonize\n\n```php\n\u003c?php\nuse HanifHefaz\\Dcter\\Dcter;\n\n$date = \"1402-01-25\";\n    $carbonDate = Dcter::Carbonize($date);\n    return $carbonDate; // returns 1402-01-25 00:00:00\n```\n\n## :performing_arts: Contributions\n\nContributions are most welcome!\n\nPlease read the [Contributions](CONTRIBUTING.md) file.\n\n## ❤️ Contributors\n\nPeople who contributed to this package:\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/hanifhefaz/\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/hanifhefaz?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eHanif Hefaz\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanifhefaz%2Fdcter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhanifhefaz%2Fdcter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanifhefaz%2Fdcter/lists"}