respinar/contao-jalalidate
Composer 安装命令:
composer require respinar/contao-jalalidate
包简介
Iranian Date for Contao
README 文档
README
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
- Added
Use Iranian Datesetting 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
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
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:
{{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 formatj F Y(e.g., 15 Esfand 1403).
Example Usage:
-
Custom Format:
<p>Current Iranian Date: {{iranian_date::j F Y}}</p>
This will display the current date in the format
15 Esfand 1403. -
Fallback to Default Format:
<p>Current Iranian Date: {{iranian_date}}</p>
If no format is provided, it will fall back to the global date format configured in Contao (or
j F Yif no global format is set). -
Custom Timestamp:
<p>Specific Date: {{iranian_date::j F Y::1617235200}}</p>
You can also pass a custom timestamp to display a specific date in Iranian format.
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
To install the Contao Iranian Date Bundle, run the following Composer command:
composer require respinar/contao-iraniandate
Configuration
- 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. - Custom Date Format: You can specify a custom date format directly in the
{{iranian_date::[format]}}insert tag.
License
MIT License. See LICENSE for more details.
respinar/contao-jalalidate 适用场景与选型建议
respinar/contao-jalalidate 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 233 次下载、GitHub Stars 达 2, 最近一次更新时间为 2016 年 08 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「bundle」 「date」 「contao」 「persian」 「shamsi」 「iranian」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 respinar/contao-jalalidate 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 respinar/contao-jalalidate 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 respinar/contao-jalalidate 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Contao Open Source CMS
Tools to convert between .NET and PHP date formats
2lenet/EasyAdminPlusBundle
The bundle for easy using json-rpc api on your project
Diese Contao 4 Erweiterung stellt Google reCAPTCHA V2 in Form eines neuen Formularfeldes im Formulargenerator bereit. This extension provides Google reCAPTCHA V2 in the form of a new form field in the form generator of Contao Open Source CMS.
Provide a way to secure accesses to all routes of an symfony application.
统计信息
- 总下载量: 233
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 15
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-08-04