2017 © Pedro Peláez
 

symfony-bundle date-converter-bundle

This bundle adds a Twig Extension with a filter for automatically dates to more readable format, such as 'today', 'yesterday', '5 minutes ago', '2 days ago', etc...

image

artur-gajewski/date-converter-bundle

This bundle adds a Twig Extension with a filter for automatically dates to more readable format, such as 'today', 'yesterday', '5 minutes ago', '2 days ago', etc...

  • Friday, October 3, 2014
  • by artur-gajewski
  • Repository
  • 0 Watchers
  • 3 Stars
  • 953 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

AgaDateConverterBundle

About

This bundle adds a Twig Extension with a filter for automatically converting date to more human readable format:, (*1)

  • Yesterday
  • 5 minutes ago
  • 2 hours ago
  • 3 days ago

and many more formats..., (*2)

Travis CI status

Build Status, (*3)

Installation

Add the following lines to your composer.json file and update your project's composer installation., (*4)

{
    "require": {
       "artur-gajewski/date-converter-bundle": "1.0.*@dev"
    }
}

Add this bundle to your application's kernel:, (*5)

// application/ApplicationKernel.php
public function registerBundles()
{
  return array(
      // ...
      new Aga\DateConverterBundle\DateConverterBundle(),
      // ...
  );
}

Make the Twig extensions available by updating your services configuration, (*6)

// app/config/services.yml
aga_dateconverter.twig.extension:
    class: Aga\DateConverterBundle\Extension\DateConverterTwigExtension  
    tags:
        - { name: twig.extension }

Usage

This library adds a filter for twig templates that can be used like so:, (*7)

{{ item.created | ago }}

License

See LICENSE., (*8)

Contact

Email: info@arturgajewski.com, (*9)

Skype: artur.t.gajewski.com, (*10)

The Versions

03/10 2014

dev-master

9999999-dev https://github.com/artur-gajewski

This bundle adds a Twig Extension with a filter for automatically dates to more readable format, such as 'today', 'yesterday', '5 minutes ago', '2 days ago', etc...

  Sources   Download

MIT

The Requires

 

date