diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 13:44:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 13:44:03 +0000 |
commit | 293913568e6a7a86fd1479e1cff8e2ecb58d6568 (patch) | |
tree | fc3b469a3ec5ab71b36ea97cc7aaddb838423a0c /doc/src/sgml/html/datetime-julian-dates.html | |
parent | Initial commit. (diff) | |
download | postgresql-16-293913568e6a7a86fd1479e1cff8e2ecb58d6568.tar.xz postgresql-16-293913568e6a7a86fd1479e1cff8e2ecb58d6568.zip |
Adding upstream version 16.2.upstream/16.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | doc/src/sgml/html/datetime-julian-dates.html | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/doc/src/sgml/html/datetime-julian-dates.html b/doc/src/sgml/html/datetime-julian-dates.html new file mode 100644 index 0000000..9cdf484 --- /dev/null +++ b/doc/src/sgml/html/datetime-julian-dates.html @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>B.7. Julian Dates</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="datetime-units-history.html" title="B.6. History of Units" /><link rel="next" href="sql-keywords-appendix.html" title="Appendix C. SQL Key Words" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">B.7. Julian Dates</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="datetime-units-history.html" title="B.6. History of Units">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="datetime-appendix.html" title="Appendix B. Date/Time Support">Up</a></td><th width="60%" align="center">Appendix B. Date/Time Support</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 16.2 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="sql-keywords-appendix.html" title="Appendix C. SQL Key Words">Next</a></td></tr></table><hr /></div><div class="sect1" id="DATETIME-JULIAN-DATES"><div class="titlepage"><div><div><h2 class="title" style="clear: both">B.7. Julian Dates <a href="#DATETIME-JULIAN-DATES" class="id_link">#</a></h2></div></div></div><a id="id-1.11.3.10.2" class="indexterm"></a><p> + The <em class="firstterm">Julian Date</em> 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–1609) + and probably takes its name from Scaliger's father, + the Italian scholar Julius Caesar Scaliger (1484–1558). + </p><p> + In the Julian Date system, each day has a sequential number, starting + from JD 0 (which is sometimes called <span class="emphasis"><em>the</em></span> 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. + </p><p> + Although <span class="productname">PostgreSQL</span> 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. <span class="productname">PostgreSQL</span> treats a Julian Date + as running from local midnight to local midnight, the same as a normal + date. + </p><p> + This definition does, however, provide a way to obtain the astronomical + definition when you need it: do the arithmetic in time + zone <code class="literal">UTC+12</code>. For example, +</p><pre class="programlisting"> +=> 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) +</pre><p> + </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="datetime-units-history.html" title="B.6. History of Units">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="datetime-appendix.html" title="Appendix B. Date/Time Support">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="sql-keywords-appendix.html" title="Appendix C. SQL Key Words">Next</a></td></tr><tr><td width="40%" align="left" valign="top">B.6. History of Units </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 16.2 Documentation">Home</a></td><td width="40%" align="right" valign="top"> Appendix C. <acronym class="acronym">SQL</acronym> Key Words</td></tr></table></div></body></html>
\ No newline at end of file |