318
318
</row>
319
319
<row>
320
320
<entry><literal>JULIAN</>, <literal>JD</>, <literal>J</></entry>
321
- <entry>Next field is Julian Day </entry>
321
+ <entry>Next field is Julian Date </entry>
322
322
</row>
323
323
<row>
324
324
<entry><literal>ON</literal></entry>
456
456
<sect1 id="datetime-units-history">
457
457
<title>History of Units</title>
458
458
459
+ <indexterm zone="datetime-units-history">
460
+ <primary>Gregorian calendar</primary>
461
+ </indexterm>
462
+ <indexterm zone="datetime-units-history">
463
+ <primary>Julian date</primary>
464
+ </indexterm>
465
+
466
+ <para>
467
+ The SQL standard states that <quote>Within the definition of a
468
+ <quote>datetime literal</quote>, the <quote>datetime
469
+ values</quote> are constrained by the natural rules for dates and
470
+ times according to the Gregorian calendar</quote>.
471
+ <productname>PostgreSQL</> follows the SQL
472
+ standard's lead by counting dates exclusively in the Gregorian
473
+ calendar, even for years before that calendar was in use.
474
+ This rule is known as the <firstterm>proleptic Gregorian calendar</>.
475
+ </para>
476
+
459
477
<para>
460
478
The Julian calendar was introduced by Julius Caesar in 45 BC.
461
479
It was in common use in the Western world
507
525
reluctant to change, and the Greek Orthodox countries didn't change
508
526
until the start of the 20th century.
509
527
510
- The reform was observed by Great Britain and Dominions (including what is
511
- now the USA) in 1752.
528
+ The reform was observed by Great Britain and its dominions (including what
529
+ is now the USA) in 1752.
512
530
Thus 2 September 1752 was followed by 14 September 1752.
513
531
514
532
This is why Unix systems have the <command>cal</command> program
@@ -522,18 +540,14 @@ $ <userinput>cal 9 1752</userinput>
522
540
17 18 19 20 21 22 23
523
541
24 25 26 27 28 29 30
524
542
</screen>
525
- </para>
526
543
527
- <para>
528
- The SQL standard states that <quote>Within the definition of a
529
- <quote>datetime literal</quote>, the <quote>datetime
530
- value</quote>s are constrained by the natural rules for dates and
531
- times according to the Gregorian calendar</quote>. Dates between
532
- 1582-10-05 and 1582-10-14, although eliminated in some countries
533
- by Papal fiat, conform to <quote>natural rules</quote> and are
534
- hence valid dates. <productname>PostgreSQL</> follows the SQL
535
- standard's lead by counting dates exclusively in the Gregorian
536
- calendar, even for years before that calendar was in use.
544
+ But, of course, this calendar is only valid for Great Britain and
545
+ dominions, not other places.
546
+ Since it would be difficult and confusing to try to track the actual
547
+ calendars that were in use in various places at various times,
548
+ <productname>PostgreSQL</> does not try, but rather follows the Gregorian
549
+ calendar rules for all dates, even though this method is not historically
550
+ accurate.
537
551
</para>
538
552
539
553
<para>
@@ -551,8 +565,9 @@ $ <userinput>cal 9 1752</userinput>
551
565
</para>
552
566
553
567
<para>
554
- The <quote>Julian Date</quote> is unrelated to the <quote>Julian
555
- calendar</quote>.
568
+ The <firstterm>Julian Date</firstterm> system is another type of
569
+ calendar, unrelated to the Julian calendar though it is confusingly
570
+ named similarly to that calendar.
556
571
The Julian Date system was invented by the French scholar
557
572
Joseph Justus Scaliger (1540-1609)
558
573
and probably takes its name from Scaliger's father,
@@ -564,15 +579,15 @@ $ <userinput>cal 9 1752</userinput>
564
579
is most often used by astronomers for labeling their nightly observations,
565
580
and therefore a date runs from noon UTC to the next noon UTC, rather than
566
581
from midnight to midnight: JD 0 designates the 24 hours from noon UTC on
567
- 1 January 4713 BC to noon UTC on 2 January 4713 BC.
582
+ 24 November 4714 BC to noon UTC on 25 November 4714 BC.
568
583
</para>
569
584
570
585
<para>
571
586
Although <productname>PostgreSQL</> supports Julian Date notation for
572
- input and output of dates (and also uses them for some internal datetime
573
- calculations), it does not observe the nicety of having dates run from
574
- noon to noon. <productname>PostgreSQL</> treats a Julian Date as running
575
- from midnight to midnight.
587
+ input and output of dates (and also uses Julian dates for some internal
588
+ datetime calculations), it does not observe the nicety of having dates
589
+ run from noon to noon. <productname>PostgreSQL</> treats a Julian Date
590
+ as running from midnight to midnight.
576
591
</para>
577
592
578
593
</sect1>
0 commit comments