PHPackages                             irpug/facal - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. irpug/facal

ActiveLibrary

irpug/facal
===========

Create and Print Persian datetime based on standard DateTime and Carbon

v0.1(11y ago)469MITPHPPHP &gt;=5.5.0

Since Mar 29Pushed 11y ago1 watchersCompare

[ Source](https://github.com/irpug/facal)[ Packagist](https://packagist.org/packages/irpug/facal)[ Docs](https://github.com/irpug/facal)[ RSS](/packages/irpug-facal/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

facal
=====

[](#facal)

[![Latest Version](https://camo.githubusercontent.com/de45454fd8fa6ed8cb273fc9972e5874de3568bb5cc578e0ffcf2b44009e6228/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7468657068706c65616775652f3a7061636b6167655f6e616d652e7376673f7374796c653d666c61742d737175617265)](https://github.com/thephpleague/:package_name/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

A collection of Persian date/time utilities to get and print DateTime Object in Persian formats based on Carbon, \\DateTime and IntlCalendar.

Requirements
------------

[](#requirements)

- PHP &gt;= 5.3
- php intl extension
- Carbon Library

Install
-------

[](#install)

Via Composer

```
$ composer require irpug/facal
```

Usage
-----

[](#usage)

```
ini_set('intl.default_locale', 'fa_IR');

require 'vendor/autoload.php';

use IrPUG\FaCal\Lib\PersianDateTime;
use IrPUG\FaCal\Lib\PersianCarbon;
use IrPUG\FaCal\FaCalUtils;

$date = new PersianDateTime();
$date->setPersianDate(1394, 2, 2);

var_dump($date);

var_dump(FaCalUtils::printDateTime($date, FaCalUtils::FULL));
var_dump(FaCalUtils::printDateTime($date, FaCalUtils::SHORT));
var_dump(FaCalUtils::printDateTime($date, FaCalUtils::NONE));
var_dump(FaCalUtils::printDateTime($date, FaCalUtils::LONG));
var_dump(FaCalUtils::printDateTime($date, FaCalUtils::MEDIUM));
var_dump(FaCalUtils::printDateTime($date, "EEEE, d 'of' MMMM y"));
var_dump(FaCalUtils::getYear($date));
var_dump(FaCalUtils::getMonthNum($date));
var_dump(FaCalUtils::getMonthName($date));
var_dump(FaCalUtils::getWeekdayName($date));
var_dump(FaCalUtils::getWeekdayNum($date));
var_dump(FaCalUtils::getQuarter($date));

var_dump(PersianCarbon::createFromPersianDate(1394, 1, 1)->addDay());
var_dump(FaCalUtils::printDateTime(PersianCarbon::createFromPersianDate(1394, 1, 1)->addDay(), FaCalUtils::FULL));
var_dump(PersianCarbon::createFromPersianDate(1393, 12, 28)->diffForHumans());
```

Credits
-------

[](#credits)

- [Reza Haghighi](https://github.com/rhqiq)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4068d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/921121a2f0b0551d22cb8f96dca852db08cd13944995f3fb6655c98d903426a8?d=identicon)[rhqiq](/maintainers/rhqiq)

---

Top Contributors

[![rhqiq](https://avatars.githubusercontent.com/u/2012582?v=4)](https://github.com/rhqiq "rhqiq (8 commits)")

---

Tags

datetimejalali DateTimepersian datetime

### Embed Badge

![Health badge](/badges/irpug-facal/health.svg)

```
[![Health](https://phpackages.com/badges/irpug-facal/health.svg)](https://phpackages.com/packages/irpug-facal)
```

###  Alternatives

[jenssegers/date

A date library to help you work with dates in different languages

1.8k11.2M80](/packages/jenssegers-date)[morilog/jalali

This Package helps developers to easily work with Jalali (Shamsi or Iranian) dates in PHP applications, based on Jalali (Shamsi) DateTime class.

9201.2M45](/packages/morilog-jalali)[rovangju/carbon-nbd

Carbon DateTime extension to calculate the "next business day"

2125.4k](/packages/rovangju-carbon-nbd)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
