On Thu, Jul 21, 2005 at 13:47:29 -0700,
Dann Corbit [EMAIL PROTECTED] wrote:
In round figures:
Since there are 365.2422 days per tropical year, there are 31556926
seconds per year (give or take leap seconds).
Ref:
http://www.grc.nasa.gov/WWW/K-12/Numbers/Math/Mathematical_Thinking/cale
Bruno Wolff III wrote:
On Thu, Jul 21, 2005 at 13:47:29 -0700,
Dann Corbit [EMAIL PROTECTED] wrote:
In round figures:
Since there are 365.2422 days per tropical year, there are 31556926
seconds per year (give or take leap seconds).
Ref:
'; Bruno Wolff III
Cc: Greg Stark; Tino Wildenhain; Tom Lane; PostgreSQL-development;
Marc G.
Fournier
Subject: RE: [HACKERS] Imprecision of DAYS_PER_MONTH
365.2425 is the exact value computed by the formulas found in the
Gregorian calendar (a very good approximation of reality).
365.2422
-
From: Bruce Momjian [mailto:[EMAIL PROTECTED]
Sent: Friday, July 22, 2005 12:03 PM
To: Bruno Wolff III
Cc: Dann Corbit; Greg Stark; Tino Wildenhain; Tom Lane; PostgreSQL-
development; Marc G. Fournier
Subject: Re: [HACKERS] Imprecision of DAYS_PER_MONTH
Bruno Wolff III wrote:
On Thu
On Fri, Jul 22, 2005 at 12:27:50 -0700,
Dann Corbit [EMAIL PROTECTED] wrote:
Apparently, the Gregorian calendar has been fixed. From this:
http://www.physics.uq.edu.au/people/ross/phys2081/time/calendar.htm
We have this:
The Gregorian calendar has been modified since (before anything
On 2005-07-22, Bruce Momjian pgman@candle.pha.pa.us wrote:
Bruno Wolff III wrote:
According to the current calendar (again ignoring leap seconds) there
are exactly 365.2425 days per year on average. I think it makes sense to use
this number when dealing with calendar years and months.
Bruno Wolff III wrote:
On Fri, Jul 22, 2005 at 12:27:50 -0700,
Dann Corbit [EMAIL PROTECTED] wrote:
Apparently, the Gregorian calendar has been fixed. From this:
http://www.physics.uq.edu.au/people/ross/phys2081/time/calendar.htm
We have this:
The Gregorian calendar has been modified
On Thu, Jul 21, 2005 at 09:39:38 -0400,
Bruce Momjian pgman@candle.pha.pa.us wrote:
I have added this comment above the DAYS_PER_MONTH macro:
+ /*
+ *DAYS_PER_MONTH is very imprecise. The more accurate value is
+ *365.25/12 = 30.4375, or '30 days 10:30:00'.
Bruno Wolff III [EMAIL PROTECTED] writes:
On Thu, Jul 21, 2005 at 09:39:38 -0400,
Bruce Momjian pgman@candle.pha.pa.us wrote:
Let me add that we could actually do this in many places now because we
are already converting to 'time' in those places. Is this a TODO?
Shouldn't you be using
Another problem with this patch is the search-and-replace substitution
of SECS_PER_MINUTE for 60, when in point of fact there are two
different meanings of 60 in this context. For instance, this
code has no problem:
! int Log_RotationAge = 24 * 60;
but this code looks like it
Am Donnerstag, den 21.07.2005, 10:48 -0400 schrieb Tom Lane:
Another problem with this patch is the search-and-replace substitution
of SECS_PER_MINUTE for 60, when in point of fact there are two
different meanings of 60 in this context. For instance, this
code has no problem:
! int
Bruno Wolff III wrote:
On Thu, Jul 21, 2005 at 09:39:38 -0400,
Bruce Momjian pgman@candle.pha.pa.us wrote:
I have added this comment above the DAYS_PER_MONTH macro:
+ /*
+ *DAYS_PER_MONTH is very imprecise. The more accurate value is
+ *365.25/12 = 30.4375,
Tino Wildenhain wrote:
Am Donnerstag, den 21.07.2005, 10:48 -0400 schrieb Tom Lane:
Another problem with this patch is the search-and-replace substitution
of SECS_PER_MINUTE for 60, when in point of fact there are two
different meanings of 60 in this context. For instance, this
code has
Tom Lane wrote:
Another problem with this patch is the search-and-replace substitution
of SECS_PER_MINUTE for 60, when in point of fact there are two
different meanings of 60 in this context. For instance, this
code has no problem:
! int Log_RotationAge = 24 * 60;
but
Bruce Momjian pgman@candle.pha.pa.us writes:
BTW, if you actually wanted to improve readability, defining a
SECS_PER_YEAR value and replacing the various occurrences of
36525 * 864 with it would help.
IIRC the number of seconds in a year is far from a constant.
Yes, I added a
Message-
From: [EMAIL PROTECTED] [mailto:pgsql-hackers-
[EMAIL PROTECTED] On Behalf Of Bruce Momjian
Sent: Thursday, July 21, 2005 1:35 PM
To: Greg Stark
Cc: Tino Wildenhain; Tom Lane; PostgreSQL-development; Marc G.
Fournier
Subject: Re: [HACKERS] Imprecision of DAYS_PER_MONTH
Greg Stark
Greg Stark wrote:
Bruce Momjian pgman@candle.pha.pa.us writes:
BTW, if you actually wanted to improve readability, defining a
SECS_PER_YEAR value and replacing the various occurrences of
36525 * 864 with it would help.
IIRC the number of seconds in a year is far from a
Bruno Wolff III wrote:
Shouldn't you be using 365.2425/12 (30.436875) for the number of days per
month?
Well, ISO 8601 prefers 30 to some weird fraction when they
define the term month; and uses a different term calendar
month for the exact number of days in a known month.
They make a
.
---
-Original Message-
From: [EMAIL PROTECTED] [mailto:pgsql-hackers-
[EMAIL PROTECTED] On Behalf Of Bruce Momjian
Sent: Thursday, July 21, 2005 1:35 PM
To: Greg Stark
Cc: Tino Wildenhain; Tom Lane; PostgreSQL-development; Marc G.
Fournier
Subject: Re: [HACKERS] Imprecision
19 matches
Mail list logo