2017 © Pedro Peláez
 

library period

A time range immutable value object

image

league/period

A time range immutable value object

  • Monday, July 30, 2018
  • by nyamsprod
  • Repository
  • 25 Watchers
  • 387 Stars
  • 352,940 Installations
  • PHP
  • 8 Dependents
  • 1 Suggesters
  • 28 Forks
  • 1 Open issues
  • 23 Versions
  • 10 % Grown

The README.md

Period

Author Latest Version Software License Build Total Downloads, (*1)

Period is PHP's missing time range API. This package covers all basic operations regarding time ranges., (*2)

Highlights

  • Represents Interval and Bounds as immutable value objects or enumeration
  • Exposes named constructors to ease instantiation
  • Covers all basic manipulations related to time range
  • Enables working with simple or complex time ranges logic
  • Fully documented
  • Framework-agnostic

Documentation

Full documentation can be found at period.thephpleague.com., (*3)

System Requirements

You need PHP >= 8.1.0 but the latest stable version of PHP is recommended., (*4)

Install

Install Period using Composer., (*5)

$ composer require league/period

or download the library and:, (*6)

  • use any other PSR-4 compatible autoloader.
  • use the bundle autoloader script as shown below:
require 'path/to/period/repo/autoload.php';

use League\Period\Datepoint;

Datepoint::fromDateString('2012-05-23')->month()->toIso80000('Y-m-d');
//returns [2012-05-01, 2012-06-01)

where path/to/period/repo represents the path where the library was extracted., (*7)

Testing

Period has:, (*8)

  • a PHPUnit test suite
  • a code analysis compliance test suite using PHPStan.
  • a coding style compliance test suite using PHP CS Fixer.

To run the tests, run the following command from the project folder., (*9)

bash $ composer test, (*10)

Contributing

Contributions are welcome and will be fully credited. Please see CONTRIBUTING and CONDUCT for details., (*11)

Security

If you discover any security related issues, please email nyamsprod@gmail.com instead of using the issue tracker., (*12)

Changelog

Please see CHANGELOG for more information on what has changed recently., (*13)

Credits

License

The MIT License (MIT). Please see LICENSE for more information., (*14)

The Versions

30/07 2018

dev-master

9999999-dev http://period.thephpleague.com

A time range immutable value object

  Sources   Download

MIT

The Requires

  • php >=7.2.0

 

The Development Requires

date range time datetime interval dateinterval dateperiod

18/12 2017

3.x-dev

3.9999999.9999999.9999999-dev http://period.thephpleague.com

A time range immutable value object

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

date range time datetime interval dateinterval dateperiod

17/11 2017

3.4.0

3.4.0.0 http://period.thephpleague.com

A time range immutable value object

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

date range time datetime interval dateinterval dateperiod

11/09 2017

dev-feature/php7-only

dev-feature/php7-only http://period.thephpleague.com

A time range immutable value object

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

The Development Requires

date range time datetime interval dateinterval dateperiod

19/09 2016

3.3.0

3.3.0.0 http://period.thephpleague.com

A time range immutable value object

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

date range time datetime interval dateinterval dateperiod

09/05 2016

3.2.0

3.2.0.0 http://period.thephpleague.com

A time range immutable value object

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

date range time datetime interval dateinterval dateperiod

10/02 2016

3.1.1

3.1.1.0 http://period.thephpleague.com

A time range immutable value object

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

date range time datetime interval dateinterval dateperiod

01/02 2016

3.1.0

3.1.0.0 http://period.thephpleague.com

A time range immutable value object

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

date range time datetime interval dateinterval dateperiod

21/12 2015

3.0.1

3.0.1.0 http://period.thephpleague.com

A time range immutable value object

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

date range time datetime interval dateinterval dateperiod

02/09 2015

3.0.0

3.0.0.0 http://period.thephpleague.com

A time range immutable value object

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

date range time datetime interval dateinterval dateperiod

06/03 2015

2.5.1

2.5.1.0

A time range immutable value object

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

date range time datetime interval dateinterval dateperiod

06/03 2015

2.5.0

2.5.0.0

A time range immutable value object

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

date range time datetime interval dateinterval dateperiod

18/12 2014

2.4.0

2.4.0.0

A time range immutable value object

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

date range time datetime interval dateinterval dateperiod

15/12 2014

2.3.0

2.3.0.0

A time range immutable value object

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

range time datetime period dateinterval compare dateperiod

12/12 2014

2.2.0

2.2.0.0

A time range immutable value object

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

range time datetime period dateinterval compare dateperiod

08/12 2014

2.1.0

2.1.0.0

A time range immutable value object

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

range time datetime period dateinterval compare dateperiod

15/10 2014

2.0.0

2.0.0.0

A time range immutable value object

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

range time datetime period dateinterval compare dateperiod

08/10 2014

1.0.1

1.0.1.0

Period an immutable value object to deal with time range

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

range time datetime period dateinterval compare dateperiod

24/09 2014

1.0.0

1.0.0.0

Period an immutable value object to deal with time range

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

range time datetime period dateinterval compare dateperiod

22/09 2014

0.3.0

0.3.0.0

Bakame/Period a tiny class to deal with DateTime Period

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

datetime period dateinterval dateperiod

22/09 2014

0.2.1

0.2.1.0

Bakame/Tools is Toolkit of single claases for many purpose

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

date datetime dateinterval

22/09 2014

0.2.0

0.2.0.0

Bakame/Tools is Toolkit of single claases for many purpose

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

date datetime dateinterval

19/09 2014

0.1.0

0.1.0.0

Bakame/Tools is Toolkit of single claases for many purpose

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

date datetime dateinterval