2017 © Pedro Peláez
 

library timer

Timer is a library for work with times, specially greather than 24 hours

image

wallacemaxters/timer

Timer is a library for work with times, specially greather than 24 hours

  • Tuesday, June 21, 2016
  • by wallacemaxters
  • Repository
  • 1 Watchers
  • 2 Stars
  • 61 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 23 Versions
  • 3 % Grown

The README.md

WallaceMaxters\Timer Library

This is a library to work only with time in PHP., (*1)

Sometimes we need to work with hours, passing 24 in php, but the DateTime class or other functions to date do not have a satisfactory solution;, (*2)

So developed the Timer library., (*3)

With it you can work with the time very simply:, (*4)

use WallaceMaxters\Timer\Time;

$time = Time::create(0, 0, 10);

$time->format('%h:%i%s'); // '00:00:10'

$time->addSeconds(30);

$time->format(); // '00:00:40'

$time->addSeconds(-50);

$time->format('%h:%i%s'); // '-00:00:10'

If necessary you can also also use the Collection class, to facilitate some operations over time., (*5)


use WallaceMaxters\Timer\Collection; $collection = new Collection; $collection[] = Time::create(0, 10, 0); $collection[] = Time::createFromString('10 seconds'); $collection[] = Time::createFromFormat('%h:%i', '00:50'); $collection->sum(); // new Time(0, 11, 0); $collection->min(); // new time(0, 0, 10);

An example for time greather than 24 hours:, (*6)

// DateTime
$date = DateTime::createFromFormat('25:00:00');

var_dump($date->format('H:i:s')); // 01:00:00

// WallaceMaxters\Timer\Timer

$time = Time::createFromFormat('%h:%i:%s', '26:00:00');

var_dump($time->format()); // '26:00:00'

The Versions

21/06 2016

dev-master

9999999-dev

Timer is a library for work with times, specially greather than 24 hours

  Sources   Download

MIT

The Requires

 

The Development Requires

21/06 2016

2.2.1

2.2.1.0

Timer is a library for work with times, specially greather than 24 hours

  Sources   Download

MIT

The Requires

 

The Development Requires

17/06 2016

2.2.0

2.2.0.0

Timer is a library for work with times, specially greather than 24 hours

  Sources   Download

MIT

The Requires

 

The Development Requires

17/06 2016

2.1.1

2.1.1.0

Timer is a library for work with times, specially greather than 24 hours

  Sources   Download

MIT

The Requires

 

The Development Requires

16/06 2016

2.1.0

2.1.0.0

Timer is a library for work with times, specially greather than 24 hours

  Sources   Download

MIT

The Requires

 

The Development Requires

18/05 2016

2.0.1

2.0.1.0

Timer is a library for work with times, specially greather than 24 hours

  Sources   Download

MIT

The Requires

 

The Development Requires

12/04 2016

2.0.0

2.0.0.0

Timer is a library for work with times, specially greather than 24 hours

  Sources   Download

MIT

The Requires

 

The Development Requires

21/03 2016

1.2.x-dev

1.2.9999999.9999999-dev

Timer is a library for work with times, specially greather than 24 hours

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

21/03 2016

1.2.1

1.2.1.0

Timer is a library for work with times, specially greather than 24 hours

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

18/03 2016

1.2.0

1.2.0.0

Timer is a library for work with times, specially greather than 24 hours

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

04/12 2015

1.1.2

1.1.2.0

Timer is a library for work with times, specially greather than 24 hours

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

04/12 2015

1.1.1

1.1.1.0

Timer is a library for work with times, specially greather than 24 hours

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

02/12 2015

1.1.0

1.1.0.0

Timer is a library for work with times, specially greather than 24 hours

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

01/12 2015

1.0.9

1.0.9.0

Timer is a library for work with times, specially greather than 24 hours

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

01/12 2015

1.0.8

1.0.8.0

Timer is a library for work with times, specially greather than 24 hours

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

01/12 2015

1.0.7

1.0.7.0

Timer is a library for work with times, specially greather than 24 hours

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

30/11 2015

1.0.3

1.0.3.0

Timer

  Sources   Download

The Requires

  • php >=5.4.0

 

30/11 2015

1.0.4

1.0.4.0

Timer

  Sources   Download

The Requires

  • php >=5.4.0

 

30/11 2015

1.0.5

1.0.5.0

Timer is a library for work with times, specially greather than 24 hours

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

30/11 2015

1.0.2

1.0.2.0

Timer

  Sources   Download

The Requires

  • php >=5.4.0

 

30/11 2015

1.0.6

1.0.6.0

Timer is a library for work with times, specially greather than 24 hours

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

30/11 2015

1.0.0

1.0.0.0

Timer

  Sources   Download

The Requires

  • php >=5.4.0

 

30/11 2015

1.0.1

1.0.1.0

Timer

  Sources   Download

The Requires

  • php >=5.4.0