You are here

function Quant::set_period in Quant 7

Set the time period/range

See also

execute()

1 call to Quant::set_period()
Quant::execute in plugins/Quant.inc
Execute the quant for a given period

File

plugins/Quant.inc, line 30

Class

Quant
Quant class

Code

function set_period($period) {
  $this->period = $period;

  // Check if period is a string
  if (is_string($this->period)) {
    $this->period = strtotime($this->period);
  }
  else {
    if (is_array($this->period)) {

      // Check if the values are strings
      foreach ($this->period as $i => $date) {
        if (is_string($date)) {
          $this->period[$i] = strtotime($date);
        }
      }
    }
  }
}