Spork Code Libraries

DateInterval

Extend DateInterval class to add functionality and fix problems with old version.

Summary

Properties

$quirkMode

Constants

Extends
\DateInterval

Properties

$quirkMode

$quirkMode : boolean

Does this PHP version have quirks

Type

boolean

Methods

__construct()

__construct(string|\Spork\DateTime\DateInterval  $interval_spec) 

Initialize class

Parameters

string|\Spork\DateTime\DateInterval $interval_spec

toSeconds()

toSeconds() : integer

Convert interval to number of seconds

Returns

integer

isQuirkMode()

isQuirkMode() : boolean

Test if PHP version has quirks

Returns

boolean
static