From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | "Dickson S(dot) Guedes" <listas(at)guedesoft(dot)net> |
Cc: | Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>, pg-dev <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [RFC] allow 'semester' in functions EXTRACT, DATE_PART, TO_CHAR and so on. |
Date: | 2015-08-15 16:18:37 |
Message-ID: | 20150815161837.GA6092@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)archidevsys(dot)co(dot)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(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
From | Date | Subject | |
---|---|---|---|
Next Message | Noah Misch | 2015-08-15 16:47:09 | Re: Raising our compiler requirements for 9.6 |
Previous Message | Marko Tiikkaja | 2015-08-15 15:55:48 | Add support for RADIUS passwords longer than 16 octets |