2017 © Pedro Peláez
 

symfony-bundle time-formatter-bundle

Symfony2 extension to presenting time in seconds

image

hexmedia/time-formatter-bundle

Symfony2 extension to presenting time in seconds

  • Friday, August 15, 2014
  • by kuczek
  • Repository
  • 2 Watchers
  • 2 Stars
  • 275 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

TimeFormatter Symfony Bundle

Build Status Build Status Latest Stable Version Latest Unstable Version, (*1)

This is a Bundle for Symfony2 Framework where you can easli convert a datetime/timestamp to distance of time in words., (*2)

By example, (*3)

{{ var.data|time_formatter }}

Outputs, (*4)

day ago

Installation for Symfony2

1) Update your composer.json, (*5)

{
    "require": {
        "Hexmedia/TimeFormatterBundle": "dev-master"
    }
}

or use composer's require command:, (*6)

composer require Hexmedia/TimeFormatterBundle:dev-master

2) Update AppKernel, (*7)

    public function registerBundles() {
        $bundles = array(
            ...
            new Hexmedia\TimeFormatterBundle\HexmediaTimeFormatterBundle(),
            ...
            );
        return $bundles;
    }

Usage

To display distance of time in words between a date and current date:, (*8)

{{ var.data|time_formatter }}

To display distance of time between two custom dates you should use, (*9)

{{ var.data|time_formatter(message.updated) }}

The Versions

15/08 2014

dev-master

9999999-dev http://github.com/Hexmedia/time-formatter

Symfony2 extension to presenting time in seconds

  Sources   Download

MIT

The Requires

 

The Development Requires

templating twig distance of time time format

20/11 2013

v1.0.0

1.0.0.0 http://github.com/Hexmedia/time-formatter

Symfony2 extension to presenting time in seconds

  Sources   Download

MIT

The Requires

 

templating twig distance of time time format

20/11 2013

v1.0.1

1.0.1.0 http://github.com/Hexmedia/time-formatter

Symfony2 extension to presenting time in seconds

  Sources   Download

MIT

The Requires

 

templating twig distance of time time format