src/Postgresql/PostgresqlQuery.php
public function dateAdd($date, $interval, $datePart)
	{
		if (substr($interval, 0, 1) !== '-')
		{
			return "timestamp " . $date . " + interval '" . $interval . " " . $datePart . "'";
		}

		return "timestamp " . $date . " - interval '" . ltrim($interval, '-') . " " . $datePart . "'";
	}
public function dateAdd($date, $interval, $datePart)
	{
		if (substr($interval, 0, 1) !== '-')
		{
			return "timestamp " . $date . " + interval '" . $interval . " " . $datePart . "'";
		}

		return "timestamp " . $date . " - interval '" . ltrim($interval, '-') . " " . $datePart . "'";
	}
public function dateAdd ( $ date , $ interval , $ datePart ) { if ( substr ( $ interval , 0 , 1 ) !== '-' ) { return "timestamp " . $ date . " + interval '" . $ interval . " " . $ datePart . "'" ; } return "timestamp " . $ date . " - interval '" . ltrim ( $ interval , '-' ) . " " . $ datePart . "'" ; }
Add to the current date and time.

Usage:
$query->select($query->dateAdd());

Prefixing the interval with a - (negative sign) will cause subtraction to be used.

@param   string  $date      The db quoted string representation of the date to add to
@param   string  $interval  The string representation of the appropriate number of units
@param   string  $datePart  The part of the date to perform the addition on

@return  string  The string with the appropriate sql for addition of dates

@since   1.5.0
@link    http://www.postgresql.org/docs/9.0/static/functions-datetime.html.
Add to the current date and time .