/usr/share/doc/pyxplot/html/sect0028.html is in pyxplot-doc 0.9.2-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | <!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" xml:lang="en" lang="en">
<head>
<meta name="generator" content="plasTeX" />
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
<title>PyXPlot Users' Guide: Calendars</title>
<link href="sect0029.html" title="Time intervals" rel="next" />
<link href="sec-time_series.html" title="Working with time-series data" rel="prev" />
<link href="sec-time_series.html" title="Working with time-series data" rel="up" />
<link rel="stylesheet" href="styles/styles.css" />
</head>
<body>
<div class="navigation">
<table cellspacing="2" cellpadding="0" width="100%">
<tr>
<td><a href="sec-time_series.html" title="Working with time-series data"><img alt="Previous: Working with time-series data" border="0" src="icons/previous.gif" width="32" height="32" /></a></td>
<td><a href="sec-time_series.html" title="Working with time-series data"><img alt="Up: Working with time-series data" border="0" src="icons/up.gif" width="32" height="32" /></a></td>
<td><a href="sect0029.html" title="Time intervals"><img alt="Next: Time intervals" border="0" src="icons/next.gif" width="32" height="32" /></a></td>
<td class="navtitle" align="center">PyXPlot Users' Guide</td>
<td><a href="index.html" title="Table of Contents"><img border="0" alt="" src="icons/contents.gif" width="32" height="32" /></a></td>
<td><a href="sect0288.html" title="Index"><img border="0" alt="" src="icons/index.gif" width="32" height="32" /></a></td>
<td><img border="0" alt="" src="icons/blank.gif" width="32" height="32" /></td>
</tr>
</table>
</div>
<div class="breadcrumbs">
<span>
<span>
<a href="index.html">PyXPlot Users' Guide</a> <b>:</b>
</span>
</span><span>
<span>
<a href="sect0001.html">Introduction to PyXPlot</a> <b>:</b>
</span>
</span><span>
<span>
<a href="sect0022.html">Performing calculations</a> <b>:</b>
</span>
</span><span>
<span>
<a href="sec-time_series.html">Working with time-series data</a> <b>:</b>
</span>
</span><span>
<span>
<b class="current">Calendars</b>
</span>
</span>
<hr />
</div>
<div><h2 id="a0000000029">4.11.1 Calendars</h2>
<p>By default, the <tt class="tt">time.fromCalendar</tt> function makes a transition from the old Julian calendar to the new Gregorian calendar at midnight on 14th September 1752 (Gregorian calendar), when Britain and the British Empire switched calendars. Thus, dates between 2nd September and 14th September 1752 are not valid input dates, since they days never occurred in the British calendar. </p><p>This behaviour may be changed using the <tt class="tt">set calendar</tt> command<a name="a0000000525" id="a0000000525"></a>, which offers a choice of nine different calendars listed in Table <a href="sect0028.html#ex:tolstoy">4.2</a>. Most of the these calendars differ only in the date on which the transition is made between the old (Julian) calendar and the new (Gregorian) calendar. </p><p>The exceptions are the Hebrew and Islamic calendars, which have entirely different systems of months. </p><div id="ex:tolstoy" class="table"><center> <table cellspacing="0" class="tabular">
<tr>
<td style="border-top-style:solid; border-left:1px solid black; border-right:1px solid black; border-top-color:black; border-top-width:1px; text-align:left"><p> <b class="bf">Calendar</b> </p></td>
<td style="border-top-style:solid; text-align:left; border-top-color:black; border-top-width:1px; border-right:1px solid black"><p> <b class="bf">Description</b> </p></td>
</tr><tr>
<td style="border-top-style:solid; border-left:1px solid black; border-right:1px solid black; border-top-color:black; border-top-width:1px; text-align:left"><p>British </p></td>
<td style="border-top-style:solid; text-align:left; border-top-color:black; border-top-width:1px; border-right:1px solid black"><p> Use the Gregorian calendar from 14th September 1752 (Gregorian), and the Julian calendar prior to 2nd September 1752 (Julian). </p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p>French </p></td>
<td style="text-align:left; border-right:1px solid black"><p> Use the Gregorian calendar from 20th December 1582 (Gregorian), and the Julian calendar prior to 9th December 1582 (Julian). </p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p>Greek </p></td>
<td style="text-align:left; border-right:1px solid black"><p> Use the Gregorian calendar from 1st March 1923 (Gregorian), and the Julian calendar prior to 15th February 1923 (Julian). </p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p>Gregorian </p></td>
<td style="text-align:left; border-right:1px solid black"><p> Use the Gregorian calendar for all dates. </p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p>Hebrew </p></td>
<td style="text-align:left; border-right:1px solid black"><p> Use the Hebrew (Jewish) calendar. </p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p>Islamic </p></td>
<td style="text-align:left; border-right:1px solid black"><p> Use the Islamic (Muslim) calendar. Note that the Islamic calendar is undefined prior to 1st Muharram <small class="footnotesize">AH</small> 1, corresponding to 18th July <small class="footnotesize">AD</small> 622. </p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p>Julian </p></td>
<td style="text-align:left; border-right:1px solid black"><p> Use the Julian calendar for all dates. </p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p>Papal </p></td>
<td style="text-align:left; border-right:1px solid black"><p> Use the Gregorian calendar from 15th October 1582 (Gregorian), and the Julian calendar prior to 4th October 1582 (Julian). </p></td>
</tr><tr>
<td style="border-bottom-style:solid; border-bottom-width:1px; border-left:1px solid black; border-right:1px solid black; text-align:left; border-bottom-color:black"><p>Russian </p></td>
<td style="border-bottom-color:black; border-bottom-width:1px; text-align:left; border-bottom-style:solid; border-right:1px solid black"><p> Use the Gregorian calendar from 14th February 1918 (Gregorian), and the Julian calendar prior to 31st January 1918 (Julian). </p></td>
</tr>
</table> </center><div class="caption"><b>Table 4.2</b>: <span>The calendars supported by the <tt class="tt">set calendar</tt> command<a name="a0000000526" id="a0000000526"></a>, which can be used to convert dates between calendar dates and Julian Day numbers.</span></div></div><p>Optionally, the <tt class="tt">set calendar</tt> command<a name="a0000000527" id="a0000000527"></a> can be used to set different calendars to use when converting calendar dates into <tt class="tt">date</tt> objects, and when converting in the opposite direction. This is useful when converting data from one calendar to another. The syntax used to do this is as follows: </p><pre>
set calendar in Julian # only applies to time.fromCalendar()
set calendar out Gregorian # does not apply to time.fromCalendar()
set calendar in Julian out Gregorian # change both
show calendar # show calendars currently being used
</pre><p> <span class="upshape"><span class="mdseries"><span class="rm">Calculating the date of Leo Tolstoy’s birth.</span></span></span></p><div>
<table cellspacing="0" class="tabular">
<tr>
<td style="border-top-style:solid; border-left:1px solid black; border-right:1px solid black; border-top-color:black; border-top-width:1px; text-align:left"><p> The Russian novelist Leo Tolstoy was born on 28th August <img src="images/img-0158.png" alt="$1828$" style="vertical-align:0px;
width:35px;
height:12px" class="math gen" /> and died on 7th November <img src="images/img-0159.png" alt="$1910$" style="vertical-align:0px;
width:35px;
height:12px" class="math gen" /> in the Russian calendar. What dates do these correspond to in the Western calendar? </p></td>
</tr><tr>
<td style="border-bottom-style:solid; border-bottom-width:1px; border-left:1px solid black; border-right:1px solid black; text-align:left; border-bottom-color:black"><p><tt class="ttfamily">pyxplot> <b class="bfseries">set calendar in russian out british</b></tt><br /><tt class="ttfamily">pyxplot> <b class="bfseries">birth = time.fromCalendar(1828, 8,28,12,0,0)</b></tt><br /><tt class="ttfamily">pyxplot> <b class="bfseries">death = time.fromCalendar(1910,11, 7,12,0,0)</b></tt><br /><tt class="ttfamily">pyxplot> <b class="bfseries">print birth</b></tt><br /><tt class="ttfamily">Tue 1828 Sep 9 12:00:00 UTC</tt><br /><tt class="ttfamily">pyxplot> <b class="bfseries">print death</b></tt><br /><tt class="ttfamily">Sun 1910 Nov 20 12:00:00 UTC</tt> </p></td>
</tr>
</table>
</div></div>
<div class="navigation">
<table cellspacing="2" cellpadding="0" width="100%">
<tr>
<td><a href="sec-time_series.html" title="Working with time-series data"><img alt="Previous: Working with time-series data" border="0" src="icons/previous.gif" width="32" height="32" /></a></td>
<td><a href="sec-time_series.html" title="Working with time-series data"><img alt="Up: Working with time-series data" border="0" src="icons/up.gif" width="32" height="32" /></a></td>
<td><a href="sect0029.html" title="Time intervals"><img alt="Next: Time intervals" border="0" src="icons/next.gif" width="32" height="32" /></a></td>
<td class="navtitle" align="center">PyXPlot Users' Guide</td>
<td><a href="index.html" title="Table of Contents"><img border="0" alt="" src="icons/contents.gif" width="32" height="32" /></a></td>
<td><a href="sect0288.html" title="Index"><img border="0" alt="" src="icons/index.gif" width="32" height="32" /></a></td>
<td><img border="0" alt="" src="icons/blank.gif" width="32" height="32" /></td>
</tr>
</table>
</div>
<script language="javascript" src="icons/imgadjust.js" type="text/javascript"></script>
</body>
</html>
|