2017 © Pedro Peláez
 

library date-interval

Provides additional functionality to the DateInterval class

image

granam/date-interval

Provides additional functionality to the DateInterval class

  • Sunday, February 19, 2017
  • by jaroslavtyc
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5,084 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 8 Forks
  • 0 Open issues
  • 10 Versions
  • 21 % Grown

The README.md

DateInterval

Build Status, (*1)

Provides additional functionality to the DateInterval class., (*2)

Usage

<?php

use Granam\DateInterval\DateInterval;

$interval = new DateInterval('P2H');
echo $interval->toSeconds(); // "7200"
echo $interval->toSpec(); // "P2H"

$fromSeconds = DateInterval::fromSeconds(7201);
echo $fromSeconds->toSpec(); // P2HS1

Summary

The DateInterval class builds on the existing DateInterval class provided by PHP. With the new class, you may, (*3)

  • convert DateInterval to the interval spec
  • convert DateInterval to the number of seconds
  • convert number of seconds to DateInterval

Installation

Add it to your list of Composer dependencies:, (*4)

composer require granam/date-interval

The Versions

19/02 2017

3.0.x-dev

3.0.9999999.9999999-dev https://github.com/jaroslavtyc/granam-date-interval

Provides additional functionality to the DateInterval class

  Sources   Download

MIT

The Requires

  • php >=7.0
  • ext-bcmath *

 

The Development Requires

date time spec interval seconds

19/02 2017

3.0.1

3.0.1.0 https://github.com/jaroslavtyc/granam-date-interval

Provides additional functionality to the DateInterval class

  Sources   Download

MIT

The Requires

  • php >=7.0
  • ext-bcmath *

 

The Development Requires

date time spec interval seconds

19/02 2017

dev-master

9999999-dev https://github.com/jaroslavtyc/granam-date-interval

Provides additional functionality to the DateInterval class

  Sources   Download

MIT

The Requires

  • ext-bcmath *
  • php >=7.0

 

The Development Requires

date time spec interval seconds

18/02 2017

3.0.0

3.0.0.0 https://github.com/jaroslavtyc/granam-date-interval

Provides additional functionality to the DateInterval class

  Sources   Download

MIT

The Requires

  • php >=7.0
  • ext-bcmath *

 

The Development Requires

date time spec interval seconds

16/02 2017

2.0.x-dev

2.0.9999999.9999999-dev https://github.com/jaroslavtyc/granam-date-interval

Provides additional functionality to the DateInterval class

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-bcmath *

 

The Development Requires

date time spec interval seconds

16/02 2017

2.0.1

2.0.1.0 https://github.com/jaroslavtyc/granam-date-interval

Provides additional functionality to the DateInterval class

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-bcmath *

 

The Development Requires

date time spec interval seconds

17/01 2017

2.0.0

2.0.0.0 https://github.com/jaroslavtyc/granam-date-interval

Provides additional functionality to the DateInterval class

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-bcmath *

 

The Development Requires

date time spec interval seconds

14/06 2013

1.2.0

1.2.0.0 http://herrera-io.github.com/php-date-interval

Provides additional functionality to the DateInterval class.

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-bcmath *

 

The Development Requires

date time interval

19/02 2013

1.1.0

1.1.0.0 http://herrera-io.github.com/php-date-interval

Provides additional functionality to the DateInterval class.

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

date time interval

09/02 2013

1.0.0

1.0.0.0

Provides additional functionality to the DateInterval class.

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires