sfTime::add
Adds the specified number of given units of time to the given date.
<b>Example:</b> <code> // tomorrow $dt = sfTime::add(); // day after $dt = sfTime::add($mydate); // 5 days after $dt = sfTime::add($mydate, 5); // 2 months after $dt = sfTime::add($mydate, 2, sfTime::MONTH); // 4 weeks after $dt = sfTime::add($mydate, 4, sfTime::WEEK); </code>
Signature
public function add([
$ts = NULL,
[integer
$num = 1,
[
$unit = sfTime::DAY]]] )
Parameters
$ts
—$num
— integer$unit
—
Returns
- timestamp
- the timestamp result of the calculation