Re: skip weekends: revisited

Поиск
Список
Период
Сортировка
От Shachar Shemesh
Тема Re: skip weekends: revisited
Дата
Msg-id 4235A349.4000105@shemesh.biz
обсуждение исходный текст
Ответ на skip weekends: revisited  (Jeff Amiel <jamiel@istreamimaging.com>)
Список pgsql-general
Jeff Amiel wrote:

> Back in 2002, Jean-Luc Lachance gave a nifty algorithm
> (http://archives.postgresql.org/pgsql-sql/2002-06/msg00301.php) for
> determining the resulting date given a starting date and number of
> 'workdays' in the future.  The trick was that weekends (Saturday and
> Sunday) could not be counted.

...

> What am I doing/interpreting wrong?

I'm not sure about the algorithm. I can tell you, however, that such an
algorithm is locale dependent.

For example, in Israel the work week is Sunday-Thursday. Weekend is
Friday and Saturday. I'm fairly sure that there are places around the
globe in which a work-week is six days long.

          Shachar

--
Shachar Shemesh
Lingnu Open Source Consulting ltd.
Have you backed up today's work? http://www.lingnu.com/backup.html


В списке pgsql-general по дате отправления:

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: plpython function problem workaround
Следующее
От: "FERREIRA William (COFRAMI)"
Дата:
Сообщение: Re: Convert Cursor to array