borsaco/jalali-date-time-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

borsaco/jalali-date-time-bundle

Composer 安装命令:

composer require borsaco/jalali-date-time-bundle

包简介

A bundle to using jalali date time in Symfony applications

README 文档

README

A bundle to using jlali date time in Symfony applications

Install

Via Composer

composer require borsaco/jalali-date-time-bundle

Edit your app/AppKernel.php to register the bundle in the registerBundles() method as above:

class AppKernel extends Kernel
{

    public function registerBundles()
    {
        $bundles = array(
            // ...
            // register the bundle here
            new Borsaco\JalaliDateTimeBundle\JalaliDateTimeBundle()
        );
    }
}

Usage

Wherever you have access to the service container :

<?php
    // get the jlali date as a service
    $jlaliDateTime = $this->container->get('jalali_date_time');

    $jlaliDateTime->date('l j F Y H:i');
    $jlaliDateTime->date('Y-m-d', false, false);
    $jlaliDateTime->date('Y-m-d', false, false, false);
    $jlaliDateTime->date("l j F Y H:i T", false, null, null, 'America/New_York');
    
    // convert to jalali
    $unixDatetime = date("U");
    $jlaliDateTime->date('l j F Y H:i', $unixDatetime);

?>

For use the form type add JalaliDateType form type and create your view with this library: https://github.com/beygi/bootstrap-persian-datetimepicker

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-07-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固