Re: pgsql: Add time/date macros for code clarity: #define DAYS_PER_YEAR

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Add time/date macros for code clarity: #define DAYS_PER_YEAR
Date: 2005-07-21 04:19:27
Message-ID: 14991.1121919567@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

momjian(at)svr1(dot)postgresql(dot)org (Bruce Momjian) writes:
> Log Message:
> -----------
> Add time/date macros for code clarity:

> #define DAYS_PER_YEAR 365.25
> #define MONTHS_PER_YEAR 12
> #define DAYS_PER_MONTH 30
> #define HOURS_PER_DAY 24

Considering that only one of these four is actually an accurate
constant, I have to question the usefulness of this.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2005-07-21 04:41:44 pgsql: Remove unnecessary parentheses in assignments.
Previous Message Tom Lane 2005-07-21 04:15:04 pgsql: Fix storage size for btree_gist interval indexes.