定制 respinar/contao-jalalidate 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

respinar/contao-jalalidate

Composer 安装命令:

composer require respinar/contao-jalalidate

包简介

Iranian Date for Contao

README 文档

README

Latest Stable Version Total Downloads Latest Unstable Version License

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 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

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 format j F Y (e.g., 15 Esfand 1403).

Example Usage:

  1. Custom Format:

    <p>Current Iranian Date: {{iranian_date::j F Y}}</p>

    This will display the current date in the format 15 Esfand 1403.

  2. 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 Y if no global format is set).

  3. 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

  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

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 我们能提供哪些服务?
定制开发 / 二次开发

基于 respinar/contao-jalalidate 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 233
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 15
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-08-04