バージョンごとのドキュメント一覧

B.7. Julian Dates #

The <firstterm>Julian Date</firstterm> system is a method for numbering days. It is unrelated to the Julian calendar, though it is confusingly named similarly to that calendar. The Julian Date system was invented by the French scholar Joseph Justus Scaliger (1540&ndash;1609) and probably takes its name from Scaliger's father, the Italian scholar Julius Caesar Scaliger (1484&ndash;1558). ユリウス日は日に番号を付ける方法です。 名前が似ていて混乱しますが、ユリウス暦とは関係ありません。 ユリウス日は、フランスの学者Joseph Justus Scaliger(1540–1609)によって発明され、おそらくこの語源は彼の父であるイタリアの学者、Julius Caesar Scaliger(1484–1558)からの引用と考えられます。

In the Julian Date system, each day has a sequential number, starting from JD 0 (which is sometimes called <emphasis>the</emphasis> Julian Date). JD 0 corresponds to 1 January 4713 BC in the Julian calendar, or 24 November 4714 BC in the Gregorian calendar. Julian Date counting is most often used by astronomers for labeling their nightly observations, and therefore a date runs from noon UTC to the next noon UTC, rather than from midnight to midnight: JD 0 designates the 24 hours from noon UTC on 24 November 4714 BC to noon UTC on 25 November 4714 BC. ユリウス日システムでは、JD 0(よくいわゆるユリウス日と呼ばれます)から始まる日は連番です。 JD 0はユリウス暦の紀元前4713年1月1日、またはグレゴリオ暦の紀元前4714年11月24日に対応します。 ユリウス日の数え方は、天文学者が夜間の観測にラベルを付けるためにより良く使用されました。 このため、深夜0時から深夜0時までではなく、UTC正午から次のUTC正午までが1日でした。 JD 0は紀元前4714年11月24日のUTC正午から紀元前4714年11月25日のUTC正午までの24時間であると明示されています。

Although <productname>PostgreSQL</productname> supports Julian Date notation for input and output of dates (and also uses Julian dates for some internal datetime calculations), it does not observe the nicety of having dates run from noon to noon. <productname>PostgreSQL</productname> treats a Julian Date as running from local midnight to local midnight, the same as a normal date. PostgreSQLは日付の入出力においてユリウス日記法を(および、一部の日付時間間隔の計算においてユリウス日を)サポートしますが、正午から正午までという微妙な日付の数え方を守っていません。 PostgreSQLは通常の日付と同様に、ローカルの深夜0時から深夜0時までとしてユリウス日を扱います。

This definition does, however, provide a way to obtain the astronomical definition when you need it: do the arithmetic in time zone <literal>UTC+12</literal>. For example, ただし、この定義は必要に応じて天文時の定義を取得する方法を提供します。タイムゾーンUTC+12で計算します。 たとえば、

=> SELECT extract(julian from '2021-06-23 7:00:00-04'::timestamptz at time zone 'UTC+12');
           extract
------------------------------
 2459388.95833333333333333333
(1 row)
=> SELECT extract(julian from '2021-06-23 8:00:00-04'::timestamptz at time zone 'UTC+12');
               extract
--------------------------------------
 2459389.0000000000000000000000000000
(1 row)
=> SELECT extract(julian from date '2021-06-23');
 extract
---------
 2459389
(1 row)