public function Period::getDuration in Recurring Time Period 8
Gets the duration of the billing period, in seconds.
Return value
int The duration.
File
- src/
DateTime/ Period.php, line 136
Class
- Period
- Represents a period of time with specific start and end dates.
Namespace
Drupal\recurring_period\DatetimeCode
public function getDuration() {
return $this->endDate
->format('U') - $this->startDate
->format('U');
}