2017-25 © Pedro Peláez
 

library time-convert

Helps you convert time units and increase readability

image

druc/time-convert

Helps you convert time units and increase readability

  • Sunday, May 20, 2018
  • by druc
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 100 % Grown

The README.md

TimeConvert

A small package to help you convert time units and increase readability., (*1)

``` php return TimeConvert::hours(12)->toMinutes(); // readable and meaningful, (*2)

vs, (*3)

return 60 * 12;, (*4)



## Install Via Composer ``` bash $ composer require druc/time-convert

Usage

``` php TimeConvert::seconds(60)->toMinutes(); // 1 TimeConvert::seconds(3600)->toHours(); // 1 TimeConvert::seconds(86400)->toDays(); // 1, (*5)

TimeConvert::minutes(1)->toSeconds(); // 60 TimeConvert::minutes(60)->toHours(); // 1 TimeConvert::minutes(1440)->toDays(); // 1, (*6)

TimeConvert::hours(1)->toSeconds(); // 3600 TimeConvert::hours(1)->toMinutes(); // 60 TimeConvert::hours(24)->toDays(); // 1, (*7)

TimeConvert::days(1)->toSeconds(); // 86400 TimeConvert::days(1)->toMinutes(); // 1440 TimeConvert::days(1)->toHours(); // 24 ```, (*8)

License

The MIT License (MIT). Please see License File for more information., (*9)

The Versions

20/05 2018

dev-master

9999999-dev https://github.com/druc/time-convert

Helps you convert time units and increase readability

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

The Development Requires

time conversion package

20/05 2018

v0.1

0.1.0.0 https://github.com/druc/time-convert

Helps you convert time units and increase readability

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

The Development Requires

time conversion package