2017 © Pedro Peláez
 

library date-interval

Provides additional functionality to the DateInterval class.

image

tubssz/date-interval

Provides additional functionality to the DateInterval class.

  • Sunday, March 6, 2016
  • by tubssp
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,641 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 7 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

DateInterval

Build Status, (*1)

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

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 back to DateInterval from the number of seconds

The conversion to seconds requires a bit of explaining., (*4)

Installation

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

$ composer require tubssz/date-interval=1.*

Usage

<?php

use Herrera\DateInterval\DateInterval;

$interval = new DateInteval('P2H');

echo $interval->toSeconds(); // "7200"
echo DateInterval::toSeconds($interval); // "7200"

echo $interval->toSpec(); // "P2H"
echo DateInterval::toSpec($interval); // "P2H"

The Versions

06/03 2016

dev-master

9999999-dev https://github.com/tubssz/php-date-interval

Provides additional functionality to the DateInterval class.

  Sources   Download

MIT

The Requires

  • php >=5.3|~7.0
  • ext-bcmath *

 

The Development Requires

by Andreas Lemke

date time interval

06/03 2016

1.3.4

1.3.4.0 https://github.com/tubssz/php-date-interval

Provides additional functionality to the DateInterval class.

  Sources   Download

MIT

The Requires

  • php >=5.3|~7.0
  • ext-bcmath *

 

The Development Requires

by Andreas Lemke

date time interval

06/03 2016

1.3.2

1.3.2.0 https://github.com/tubssz/php-date-interval

Provides additional functionality to the DateInterval class.

  Sources   Download

MIT

The Requires

  • php >=5.3|~7.0
  • ext-bcmath *

 

The Development Requires

by Andreas Lemke

date time interval

06/03 2016

1.3.3

1.3.3.0 https://github.com/tubssz/php-date-interval

Provides additional functionality to the DateInterval class.

  Sources   Download

MIT

The Requires

  • php >=5.3|~7.0
  • ext-bcmath *

 

The Development Requires

by Andreas Lemke

date time interval

04/02 2016

1.3.0

1.3.0.0 https://github.com/tubssp/php-date-interval

Provides additional functionality to the DateInterval class.

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-bcmath *

 

The Development Requires

by Andreas Lemke

date time interval

04/02 2016

1.3.1

1.3.1.0 https://github.com/tubssp/php-date-interval

Provides additional functionality to the DateInterval class.

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-bcmath *

 

The Development Requires

by Andreas Lemke

date time interval

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