You can clone with
The definitions here are appropriate:
I'm not sure whether a duration is strictly necessary (we could just use a period and only use the seconds component), this requires further discussion.
There's also the idea of a recurring period or duration with an interval, there should be an iterator for this... something like ...
$interval = new Year(2012);
$period = new Period('2 weeks');
$iterator = new PeriodIterator($interval, $period);
foreach ($iterator as $value)
// $value would be an Interval containing each fortnightly chunk of the year 2012.
Decided not to conflate Period and Duration instances, as you will always be able to get concrete seconds from a duration, but not necessarily a period.
Added Duration class (#4)
Added IntervalInterface::duration() (#4)
Implementation of periods moved to #32.
Added TimeSpanInterface and TimePointInterface::add/subtract() (#4)
Implemented TimePointInterface::differenceAsDuration() (fixes #4)