2017 © Pedro Peláez
 

library chronos

Chronos

image

zazalt/chronos

Chronos

  • Thursday, February 23, 2017
  • by Zazalt
  • Repository
  • 1 Watchers
  • 3 Stars
  • 195 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Chronos

Build Status Coverage Status Code Climate Issue Count Total Downloads Latest Stable Version Version, (*1)

Chronos is a PHP library/package for date and time management., (*2)

Requirements

  • php >= 7.1.0

Packagist Dependencies

  • None

Installation

With composer: ``` json { "require": { "zazalt/chronos": "dev-master" } }, (*3)


## Usage ```php $Chronos = new Zazalt\Chronos\Chronos(); /** * Transform/parse a human date to machine date (Y-m-d) * eg: 28.09.2013 (d.m.Y) => 2013-09-28 * * @return string */ $Chronos->dateToMachineDate($datetime, $humanFormat); /** * Transform/parse a human date to machine date (Y-m-d H:i:s) * eg: 28.09.2013 23:41:12 => 2013-09-28 23:41:12 * * @return string */ $Chronos->dateToMachineDateTime($datetime, $humanFormat); /** * Transform/parse a machine date to human date * eg: 01.09.2013 => 2013-09-01 * */ $Chronos->dateToHuman($datetime, $humanFormat); /** * Return days number between two dates * * @return integer * */ $Chronos->daysBetweenTwoDates($startDate, $endDate); /** * Return months number between two dates * * @return integer */ $Chronos->monthsBetweenTwoDates($startDate, $endDate); /** * Return years number between two dates * * @return integer */ $Chronos->yearsBetweenTwoDates($startDate, $endDate); /** * Not implemented/documented, yet! */ $Chronos->seconds2HMS($secs);

The Versions

23/02 2017

dev-master

9999999-dev https://github.com/Zazalt/Chronos

Chronos

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

string