Forum OpenACS Q&A: Re: how to find out the exact date of i.e. "1st monday of this month"

David,

It only works because of the ports of the oracle functions.  See my previous post on where those functions were defined.

The next_day function port for PG converts the weekday to int. So if you'd want to use 1, then I guess rewrite the function and support both a weekday and an int.

Eh, I hope we remove date functions that hit the database step by step. AOLserver and/or TCL have date functions as well and using them means:

* hitting the database less frequently
* using less db handles
* less portability woes

If you are in a clustered environment you need to think about syncing times between the different machines. Oh, and whenever you stick data into the database then get the date+time from the database machine.