1
- <!-- $PostgreSQL: pgsql/doc/src/sgml/datetime.sgml,v 2.57 2007/12/02 22:33:20 tgl Exp $ -->
1
+ <!-- $PostgreSQL: pgsql/doc/src/sgml/datetime.sgml,v 2.58 2007/12/15 01:18:33 tgl Exp $ -->
2
2
3
3
<appendix id="datetime-appendix">
4
4
<title>Date/Time Support</title>
470
470
<title>History of Units</title>
471
471
472
472
<para>
473
- The Julian Date was invented by the French scholar
474
- Joseph Justus Scaliger (1540-1609)
475
- and probably takes its name from Scaliger's father,
476
- the Italian scholar Julius Caesar Scaliger (1484-1558).
477
- Astronomers have used the Julian period to assign a unique number to
478
- every day since 1 January 4713 BC. This is the so-called Julian Date
479
- (JD). JD 0 designates the 24 hours from noon UTC on 1 January 4713 BC
480
- to noon UTC on 2 January 4713 BC.
481
- </para>
482
-
483
- <para>
484
- The <quote>Julian Date</quote> is different from the <quote>Julian
485
- Calendar</quote>. The Julian calendar
486
- was introduced by Julius Caesar in 45 BC. It was in common use
473
+ The Julian calendar was introduced by Julius Caesar in 45 BC.
474
+ It was in common use in the Western world
487
475
until the year 1582, when countries started changing to the Gregorian
488
476
calendar. In the Julian calendar, the tropical year is
489
477
approximated as 365 1/4 days = 365.25 days. This gives an error of
529
517
4 October.
530
518
This was observed in Italy, Poland, Portugal, and Spain. Other Catholic
531
519
countries followed shortly after, but Protestant countries were
532
- reluctant to change, and the Greek orthodox countries didn't change
520
+ reluctant to change, and the Greek Orthodox countries didn't change
533
521
until the start of the 20th century.
534
522
535
523
The reform was observed by Great Britain and Dominions (including what is
@@ -549,30 +537,56 @@ $ <userinput>cal 9 1752</userinput>
549
537
</screen>
550
538
</para>
551
539
552
- <note >
553
- <para>
554
- The SQL standard states that < quote>Within the definition of a
555
- <quote>datetime literal< /quote>, the <quote>datetime
556
- value </quote>s are constrained by the natural rules for dates and
557
- times according to the Gregorian calendar</quote>. Dates between
558
- 1752-09-03 and 1752-09-13, although eliminated in some countries
559
- by Papal fiat, conform to <quote>natural rules</quote> and are
560
- hence valid dates.
561
- </para>
562
- </note >
540
+ <para >
541
+ The SQL standard states that <quote>Within the definition of a
542
+ <quote>datetime literal</ quote>, the <quote>datetime
543
+ value< /quote>s are constrained by the natural rules for dates and
544
+ times according to the Gregorian calendar </quote>. Dates between
545
+ 1582-10-05 and 1582-10-14, although eliminated in some countries
546
+ by Papal fiat, conform to <quote>natural rules</quote> and are
547
+ hence valid dates. <productname>PostgreSQL</> follows the SQL
548
+ standard's lead by counting dates exclusively in the Gregorian
549
+ calendar, even for years before that calendar was in use.
550
+ </para >
563
551
564
552
<para>
565
553
Different calendars have been developed in various parts of the
566
554
world, many predating the Gregorian system.
567
555
568
556
For example,
569
557
the beginnings of the Chinese calendar can be traced back to the 14th
570
- century BC. Legend has it that the Emperor Huangdi invented the
558
+ century BC. Legend has it that the Emperor Huangdi invented that
571
559
calendar in 2637 BC.
572
560
573
561
The People's Republic of China uses the Gregorian calendar
574
562
for civil purposes. The Chinese calendar is used for determining
575
563
festivals.
576
564
</para>
565
+
566
+ <para>
567
+ The <quote>Julian Date</quote> is unrelated to the <quote>Julian
568
+ calendar</quote>.
569
+ The Julian Date system was invented by the French scholar
570
+ Joseph Justus Scaliger (1540-1609)
571
+ and probably takes its name from Scaliger's father,
572
+ the Italian scholar Julius Caesar Scaliger (1484-1558).
573
+ In the Julian Date system, each day has a sequential number, starting
574
+ from JD 0 (which is sometimes called <emphasis>the</> Julian Date).
575
+ JD 0 corresponds to 1 January 4713 BC in the Julian calendar, or
576
+ 24 November 4714 BC in the Gregorian calendar. Julian Date counting
577
+ is most often used by astronomers for labeling their nightly observations,
578
+ and therefore a date runs from noon UTC to the next noon UTC, rather than
579
+ from midnight to midnight: JD 0 designates the 24 hours from noon UTC on
580
+ 1 January 4713 BC to noon UTC on 2 January 4713 BC.
581
+ </para>
582
+
583
+ <para>
584
+ Although <productname>PostgreSQL</> supports Julian Date notation for
585
+ input and output of dates (and also uses them for some internal datetime
586
+ calculations), it does not observe the nicety of having dates run from
587
+ noon to noon. <productname>PostgreSQL</> treats a Julian Date as running
588
+ from midnight to midnight.
589
+ </para>
590
+
577
591
</sect1>
578
592
</appendix>
0 commit comments