2017 © Pedro Peláez
 

library time-formatter

Time Formatter

image

unilex6/time-formatter

Time Formatter

  • Tuesday, October 11, 2016
  • by unilex6
  • Repository
  • 0 Watchers
  • 0 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 56 % Grown

The README.md

Time Formatter

Instalation

  1. Add following line into require section in your composer.json:
    "require": {
        "unilex6/time-formatter": "dev-master"
    }
  1. If you want to install package directly from GitHub, you need to add following line into repositories section in your composer.json to 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, (*1)

The Versions

11/10 2016

dev-master

9999999-dev

Time Formatter

  Sources   Download

by Avatar unilex6