You are here

function mostpopular_interval_timestamp in Drupal Most Popular 7

Returns the timestamp, relative to the current time, that marks the start of this interval.

Parameters

object $interval: The interval configuration.

Return value

integer A timestamp in the past, or 0 if there is no interval string specified.

File

./mostpopular.module, line 592
The main file for the Most Popular module.

Code

function mostpopular_interval_timestamp($interval) {
  if (is_int($interval)) {
    $interval = mostpopular_intervals($interval);
  }
  return !empty($interval->string) ? strtotime($interval->string) : 0;
}