PHPackages                             respinar/contao-iraniandate - 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. [Localization &amp; i18n](/categories/localization)
4. /
5. respinar/contao-iraniandate

ActiveContao-bundle[Localization &amp; i18n](/categories/localization)

respinar/contao-iraniandate
===========================

Iranian Date for Contao

2.7.0(1y ago)27MITPHPPHP ^8.0

Since Jun 2Pushed 6mo ago2 watchersCompare

[ Source](https://github.com/respinar/contao-iraniandate)[ Packagist](https://packagist.org/packages/respinar/contao-iraniandate)[ RSS](/packages/respinar-contao-iraniandate/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (34)Used By (0)

Iranian Date Bundle for Contao Open Source CMS
==============================================

[](#iranian-date-bundle-for-contao-open-source-cms)

[![Latest Stable Version](https://camo.githubusercontent.com/a38cdff5777855b15305a2aeea9e0d93a8162d99efc5e0061717551505bbfb00/68747470733a2f2f706f7365722e707567782e6f72672f72657370696e61722f636f6e74616f2d6972616e69616e6461746562756e646c652f762f737461626c652e737667)](https://packagist.org/packages/respinar/contao-iraniandatebundle) [![Total Downloads](https://camo.githubusercontent.com/c5ae89e14b16a677d6cbdb9a518092a9f5f7162e0bcbb9bcc764ccc4d371ef4f/68747470733a2f2f706f7365722e707567782e6f72672f72657370696e61722f636f6e74616f2d6972616e69616e6461746562756e646c652f646f776e6c6f6164732e737667)](https://packagist.org/packages/respinar/contao-iraniandatebundle) [![Latest Unstable Version](https://camo.githubusercontent.com/9a709e26ba0bcf2528323a205c4e6f6b6c8c2d30285a7ba9964d2ec162f1e7f9/68747470733a2f2f706f7365722e707567782e6f72672f72657370696e61722f636f6e74616f2d6972616e69616e6461746562756e646c652f762f756e737461626c652e737667)](https://packagist.org/packages/respinar/contao-iraniandatebundle) [![License](https://camo.githubusercontent.com/4c87d8d356440dd7421d14bd092d244ee544ee0479f5e689b6bb9f6a30979abf/68747470733a2f2f706f7365722e707567782e6f72672f72657370696e61722f636f6e74616f2d6972616e69616e6461746562756e646c652f6c6963656e73652e737667)](https://packagist.org/packages/respinar/contao-iraniandatebundle)

This is the Iranian Date bundle for Contao. After installing with Composer, the Use Iranian Date setting in the root page configuration allows you to toggle the Solar Hijri date format. If enabled, all dates will be displayed in the Solar Hijri (Iranian) format site-wide, regardless of the language. If the setting is disabled or for other languages, the Georgian (Gregorian) date will be displayed.

New Feature: Iranian Date Toggle
--------------------------------

[](#new-feature-iranian-date-toggle)

- **Added `Use Iranian Date` setting** to root pages in Contao 5.3+.
- Enable this setting to apply Iranian date formatting site-wide, regardless of the language.
- Translations now use the XLIFF format with support for English (`en`), Persian (`fa`), and German (`de`).

New Feature: `{{iranian_date}}` Insert Tag
------------------------------------------

[](#new-feature-iranian_date-insert-tag)

We've introduced a new insert tag: `{{iranian_date}}`. This tag allows you to display the current Iranian date in your Contao templates, and it offers flexibility in terms of date formatting.

### How It Works

[](#how-it-works)

The `{{iranian_date}}` insert tag works similarly to Contao's built-in `{{date}}` insert tag. It allows you to display the current date in the Iranian calendar with customizable date formats.

#### Syntax:

[](#syntax)

```
{{iranian_date::[format]}}
```

- `format`: The format string for the Iranian date. If no format is provided, the tag will fall back to the global date format set in Contao or use the default format `j F Y` (e.g., 15 Esfand 1403).

#### Example Usage:

[](#example-usage)

1. **Custom Format**:

    ```
    Current Iranian Date: {{iranian_date::j F Y}}
    ```

    This will display the current date in the format `15 Esfand 1403`.
2. **Fallback to Default Format**:

    ```
    Current Iranian Date: {{iranian_date}}
    ```

    If no format is provided, it will fall back to the global date format configured in Contao (or `j F Y` if no global format is set).
3. **Custom Timestamp**:

    ```
    Specific Date: {{iranian_date::j F Y::1617235200}}
    ```

    You can also pass a custom timestamp to display a specific date in Iranian format.

### Features:

[](#features)

- **Customizable Date Format**: You can specify the format for the Iranian date using the standard PHP date format (`d, m, Y, F, j`).
- **Fallback to Contao's Global Date Format**: If no format is provided, it will use the global date format from Contao settings.
- **Timestamp Support**: You can pass a specific timestamp to display a date other than the current date.

### Installation

[](#installation)

To install the **Contao Iranian Date Bundle**, run the following Composer command:

```
composer require respinar/contao-iraniandatebundle
```

### Configuration

[](#configuration)

1. **Global Date Format**: You can configure the global date format in your Contao backend. This will be the default format used for the `{{iranian_date}}` tag when no format is provided.
2. **Custom Date Format**: You can specify a custom date format directly in the `{{iranian_date::[format]}}` insert tag.

### License

[](#license)

MIT License. See [LICENSE](LICENSE) for more details.

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance56

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity79

Established project with proven stability

 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

Every ~128 days

Recently: every ~68 days

Total

31

Last Release

506d ago

Major Versions

v0.7.0 → 1.0.02017-02-28

1.3.0 → 2.0.02023-05-30

PHP version history (5 changes)v0.1.0PHP &gt;=5.3.2

v0.5.0PHP &gt;=5.4.0

1.1.0PHP &gt;=5.4

2.0.0PHP ^7.4 || ^8.0

2.1.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/b127d47e231a914661922e7f8307ac8fdda25fc155a14ee52e8cc80944a1e6d0?d=identicon)[hamidpeywasti](/maintainers/hamidpeywasti)

---

Top Contributors

[![hamidpeywasti](https://avatars.githubusercontent.com/u/1234122?v=4)](https://github.com/hamidpeywasti "hamidpeywasti (159 commits)")

---

Tags

contaocontao-bundlejalali-datetimebundledatecontaopersianshamsiiraniankhorshidisolar hijri

### Embed Badge

![Health badge](/badges/respinar-contao-iraniandate/health.svg)

```
[![Health](https://phpackages.com/badges/respinar-contao-iraniandate/health.svg)](https://phpackages.com/packages/respinar-contao-iraniandate)
```

###  Alternatives

[terminal42/contao-changelanguage

ChangeLanguage extension for Contao Open Source CMS

47240.6k16](/packages/terminal42-contao-changelanguage)[terminal42/dc_multilingual

A multilingual DC driver storing the translations in the same table for Contao Open Source CMS

1787.2k14](/packages/terminal42-dc-multilingual)[iamfarhad/validation

🇮🇷 Complete Laravel Persian validation package - Iranian national ID, mobile numbers, Shamsi dates, IBAN/Sheba, postal codes &amp; more. Modern Laravel 10-12 support with both ValidationRule objects &amp; string-based rules.

2917.3k](/packages/iamfarhad-validation)[pdir/social-feed-bundle

Social feed extension for Contao CMS

1414.8k](/packages/pdir-social-feed-bundle)

PHPackages © 2026

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