unilex6 / time-formatter
There is no license information available for the latest version (dev-master) of this package.
Time Formatter
dev-master
2016-10-11 10:01 UTC
This package is not auto-updated.
Last update: 2026-03-05 01:07:53 UTC
README
Instalation
- Add following line into
requiresection in yourcomposer.json:
"require": { "unilex6/time-formatter": "dev-master" }
- If you want to install package directly from GitHub, you need to add following line into
repositoriessection in yourcomposer.jsonto set up composer`s package source path:
"repositories": [ { "type": "git", "url": "https://github.com/unilex6/time-formatter" } ]
Basic Usage
$time = 1450224000; // 16th of December timestamp TimeFormatter::time($time); // -> 16 дек в 03:00 TimeFormatter::time($time, ['locale' => TimeFormatter::LOCALE_EN]); // -> 16 dec in 03:00 $time = 1450224000; // Yesterday timestamp, for example TimeFormatter::time($time); // -> Вчера в 03:00 TimeFormatter::time($time, ['locale' => TimeFormatter::LOCALE_EN]); // -> Yesterday at 03:00
@TODO: Extended docs