2017 © Pedro Peláez
 

project time-conversion

Convert, compare and operate with time in different units.

image

tm/time-conversion

Convert, compare and operate with time in different units.

  • Monday, December 19, 2016
  • by tommymuehle
  • Repository
  • 1 Watchers
  • 1 Stars
  • 41 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 24 % Grown

The README.md

php-time-conversion

Minimum PHP Version Build Status Test Coverage GitHub license GitHub issues, (*1)

Convert, compare and operate with time in different unit's., (*2)

Features

Example

use TM\TimeConversion\Time;
use TM\TimeConversion\Unit;

// convert
$tenWeeks = Time::fromValue(10.0, Unit::WEEK);
$tenWeeksInDays = $tenWeeks->convert(Unit::DAY);

echo $tenWeeksInDays->getAmount(); // 70

// compare
var_dump($tenWeeks->equals($tenWeeksInDays)); // true

// subtract
echo $tenWeekInDays->subtract(Time::fromValue(10, Unit::DAY)); // 60

For more and advanced examples look into the examples directory., (*3)

Requirements

  • PHP >= 5.6
  • Composer

Install

composer require tm/time-conversion ^1.0

Contributing

Please refer to CONTRIBUTING.md for information on how to contribute., (*4)

The Versions

19/12 2016

dev-master

9999999-dev https://github.com/tommy-muehle/php-time-conversion

Convert, compare and operate with time in different units.

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

time transform conversion unit time-unit

19/12 2016

1.0.0

1.0.0.0 https://github.com/tommy-muehle/php-time-conversion

Convert, compare and operate with time in different units.

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

time transform conversion unit time-unit