Re: [RFC] allow 'semester' in functions EXTRACT, DATE_PART, TO_CHAR and so on.
От | David Fetter |
---|---|
Тема | Re: [RFC] allow 'semester' in functions EXTRACT, DATE_PART, TO_CHAR and so on. |
Дата | |
Msg-id | 20150815161837.GA6092@fetter.org обсуждение исходный текст |
Ответ на | Re: [RFC] allow 'semester' in functions EXTRACT, DATE_PART, TO_CHAR and so on. ("Dickson S. Guedes" <listas@guedesoft.net>) |
Список | pgsql-hackers |
On Fri, Aug 14, 2015 at 10:06:22PM -0300, Dickson S. Guedes wrote: > 2015-08-14 21:32 GMT-03:00 Gavin Flower <GavinFlower@archidevsys.co.nz>: > ... > > So semesters don't appear to align with normal half year boundaries. > > Interesting links, thanks! > > Which sounds better for a native English: 'half', 'halfyear'? > > For example: > > > SELECT date_trunc('halfyear', current_date); > date_trunc > ------------------------ > 2015-07-01 00:00:00-03 > (1 row) > > Thanks! As with, "quarter," we need to be careful about which type of "half" we are defining. For some financial calculations, a "month" is always 30 days, a "quarter," always three "months," i.e. 90 days, and a "half" is six "months," or 180 days. Yes, date math is crazy, and yes, we have to deal with it as it exists. Cheers, David. -- David Fetter <david@fetter.org> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter@gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate
В списке pgsql-hackers по дате отправления: