2017 © Pedro Peláez
 

library persian-date-bundle

image

mtm/persian-date-bundle

  • Wednesday, October 28, 2015
  • by motammem
  • Repository
  • 1 Watchers
  • 3 Stars
  • 55 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 5 Versions
  • 6 % Grown

The README.md

Persian Date Bundle

Symfony2 PersianDateBundle, (*1)

Installation:

composer require mtm/persian-date-bundle:1.0.4

add following line to your AppKernel.php, (*2)

new Mtm\PersianDateBundle\MtmPersianDateBundle(),

Usage:

Form Type:

This bundle comes with a mtm_persian_date_type form type which prompt user for persian date at view layer and converts it to Standard PHP DateTime object at business layer. So you can use Standard PHP DateTime object as form data., (*3)

Here is how to use it:, (*4)


$dateTime = new \DateTime('tomorrow'); $this->createForm('mtm_persian_date_type', $dateTime);

Twig Filter:

This bundle also adds a very handy twig filter persian_date to format Standard PHP DateTime object., (*5)


<td> {{ post.createdAt| persian_date("Y-m-d') }} </td>

The Versions

28/10 2015

dev-master

9999999-dev

  Sources   Download

The Requires

 

by Amin Alizade

28/10 2015

v1.0.4

1.0.4.0

  Sources   Download

The Requires

 

by Amin Alizade

28/10 2015

v1.0.3

1.0.3.0

  Sources   Download

The Requires

 

by Amin Alizade

13/09 2015

v1.0.2

1.0.2.0

  Sources   Download

The Requires

 

by Amin Alizade

13/09 2015

v1.0.1

1.0.1.0

  Sources   Download

The Requires

 

by Amin Alizade