avris / time-diff
This package is abandoned and no longer maintained.
No replacement package was suggested.
Time Diff generator
v3.1
2017-05-05 15:03 UTC
Requires (Dev)
- avris/micrus-localizator: ^3.0
- phpunit/phpunit: ~4.8
- symfony/var-dumper: ^3.2
- twig/twig: ^1.31
Suggests
- avris/micrus-localizator: Provides the localization handling
- twig/twig: Localizator provides a Twig extension
README
$timeDiff = new TimeDiff();
echo $timeDiff->diff('2017-03-04 20:56');
Will echo a text like "now", "5 minutes ago", "2 hours ago" etc., depending on current time.
Translations will be handled by the Micrus Localizator.
If it's not present, please implement yourself a function l($word, $replacements = [])
that will
translate strings from files src/Translations/*.yml
.
Copyright
- Author: Andrzej Prusinowski (Avris.it)
- Licence: MIT