Someone just posted a date arithmatic function on the Postgres CookBook. We have a whole section on date manipulation functions, that you can access at
http://www.brasileiro.net/postgres/cookbook.
One interesting function is this http://www.brasileiro.net/postgres/cookbook/view-one-recipe.adp?recipe_id=21
BTW, since OpenACS users are heavy PL/pgSQL users, I hope we'll get lots of "recipes" from this community :)