2017 © Pedro Peláez
 

symfony-bundle knp-time-bundle

Knplabs time bundle makes your dates look sensible and descriptive

image

symfonyx/knp-time-bundle

Knplabs time bundle makes your dates look sensible and descriptive

  • Thursday, June 15, 2017
  • by alexzv
  • Repository
  • 1 Watchers
  • 0 Stars
  • 69 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 72 Forks
  • 0 Open issues
  • 16 Versions
  • 1 % Grown

The README.md

Friendly ago dates ("5 minutes ago")!

This bundle does one simple job: takes dates and gives you friendly "2 hours ago"-type messages. Woh!, (*1)

```html+jinja Last edited {{ post.updatedAt|ago }} , (*2)


The date formatted can be translated into any language, and may are supported out of the box. ## INSTALLATION via Composer composer require knplabs/knp-time-bundle ## CONFIGURATION Register the bundle: ```php <?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Knp\Bundle\TimeBundle\KnpTimeBundle(), ); // ... }

Enable the translation component if you haven't already done it:, (*3)

# app/config/config.yml
framework:
    # ...
    translator:      { fallback: '%locale%' } # uncomment this line if you see this line commented

USAGE

In PHP!, (*4)

<?php
// Use the helper with Php
echo $view['time']->diff($dateTime); // returns something like "3 minutes ago"

In Twig!, (*5)

```html+jinja {{ someDateTimeVariable|ago }} ... or use the equivalent function {{ time_diff(someDateTimeVariable) }}, (*6)


## TESTS If you want to run tests, please check that you have installed dev dependencies. ```bash ./vendor/bin/phpunit

Maintainers

Anyone can contribute to this repository (and it's warmly welcomed!). The following people maintain and can merge into this library:, (*7)

  • akovalyov
  • weaverryan

The Versions

15/06 2017

dev-master

9999999-dev http://github.com/KnpLabs/KnpTimeBundle

Knplabs time bundle makes your dates look sensible and descriptive

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle date time knplabs knp descriptive time

04/03 2017

1.7.3

1.7.3.0 http://github.com/KnpLabs/KnpTimeBundle

Knplabs time bundle makes your dates look sensible and descriptive

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle date time knplabs knp descriptive time

02/02 2017

1.7.2

1.7.2.0 http://github.com/KnpLabs/KnpTimeBundle

Knplabs time bundle makes your dates look sensible and descriptive

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle date time knplabs knp descriptive time

20/01 2017

1.7.1

1.7.1.0 http://github.com/KnpLabs/KnpTimeBundle

Knplabs time bundle makes your dates look sensible and descriptive

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle date time knplabs knp descriptive time

22/10 2016

1.7.0

1.7.0.0 http://github.com/KnpLabs/KnpTimeBundle

Knplabs time bundle makes your dates look sensible and descriptive

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle date time knplabs knp descriptive time

10/05 2016

1.6.1

1.6.1.0 http://github.com/KnpLabs/KnpTimeBundle

Knplabs time bundle makes your dates look sensible and descriptive

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle date time knplabs knp descriptive time

22/04 2016

1.6.0

1.6.0.0 http://github.com/KnpLabs/KnpTimeBundle

Knplabs time bundle makes your dates look sensible and descriptive

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle date time knplabs knp descriptive time

24/11 2015

1.5.3

1.5.3.0 http://github.com/KnpLabs/KnpTimeBundle

Knplabs time bundle makes your dates look sensible and descriptive

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle date time knplabs knp descriptive time

12/11 2015

1.5.2

1.5.2.0 http://github.com/KnpLabs/KnpTimeBundle

Knplabs time bundle makes your dates look sensible and descriptive

  Sources   Download

MIT

The Requires

 

The Development Requires

bundle date time knplabs knp descriptive time

11/11 2015

1.5.1

1.5.1.0 http://github.com/KnpLabs/KnpTimeBundle

Knplabs time bundle makes your dates look sensible and descriptive

  Sources   Download

MIT

The Requires

 

bundle date time knplabs knp descriptive time

07/10 2015

1.5.0

1.5.0.0 http://github.com/KnpLabs/KnpTimeBundle

Knplabs time bundle makes your dates look sensible and descriptive

  Sources   Download

MIT

The Requires

 

bundle date time knplabs knp descriptive time

17/09 2015

1.4.0

1.4.0.0 http://github.com/KnpLabs/KnpTimeBundle

Knplabs time bundle makes your dates look sensible and descriptive

  Sources   Download

MIT

The Requires

 

bundle date time knplabs knp descriptive time

12/12 2013

v1.3

1.3.0.0 http://github.com/KnpLabs/KnpTimeBundle

Knplabs time bundle makes your dates look sensible and descriptive

  Sources   Download

MIT

The Requires

 

bundle date time knplabs knp descriptive time

15/11 2013

v1.2

1.2.0.0 http://github.com/KnpLabs/KnpTimeBundle

Knplabs time bundle makes your dates look sensible and descriptive

  Sources   Download

MIT

The Requires

 

bundle date time knplabs knp descriptive time

11/01 2013

v1.1

1.1.0.0 http://github.com/KnpLabs/KnpTimeBundle

Knplabs time bundle makes your dates look sensible and descriptive

  Sources   Download

MIT

The Requires

 

bundle date time knplabs knp descriptive time

11/01 2013

v1.0

1.0.0.0 http://github.com/KnpLabs/KnpTimeBundle

Knplabs time bundle makes your dates look sensible and descriptive

  Sources   Download

MIT

The Requires

 

bundle date time knplabs knp descriptive time