2017 © Pedro Peláez
 

library date-interval

Provides additional functionality to the DateInterval class.

image

herrera-io/date-interval

Provides additional functionality to the DateInterval class.

  • Friday, June 14, 2013
  • by kherge
  • Repository
  • 0 Watchers
  • 13 Stars
  • 22,916 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 6 Forks
  • 1 Open issues
  • 4 Versions
  • 1 % 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 herrera-io/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

14/06 2013

dev-master

9999999-dev 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

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