code: func Date(db XODB, v0 pgtypes.Abstime, v1 time.Time, v2 time.Time) (time.Time, error) {
  	var err error
  
  	// sql query
  	const sqlstr = `SELECT pg_catalog.date($1, $2, $3)`
  
  	// run query
  	var ret time.Time
  	XOLog(sqlstr, v0, v1, v2)
  	err = db.QueryRow(sqlstr, v0, v1, v2).Scan(&ret)
  	if err != nil {
  		return time.Time{}, err
  	}
  
  	return ret, nil
  }
docs: // Date calls the stored procedure 'pg_catalog.date(abstime, timestamp without time zone, timestamp with time zone) date' on db.