/usr/share/doc/pyxplot/html/sect0254.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 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 | <!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: The time module</title>
<link href="sec-functions_types.html" title="The types module" rel="next" />
<link href="sect0253.html" title="The stats module" rel="prev" />
<link href="ch-function_list.html" title="List of in-built functions" 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="sect0253.html" title="The stats module"><img alt="Previous: The stats module" border="0" src="icons/previous.gif" width="32" height="32" /></a></td>
<td><a href="ch-function_list.html" title="List of in-built functions"><img alt="Up: List of in-built functions" border="0" src="icons/up.gif" width="32" height="32" /></a></td>
<td><a href="sec-functions_types.html" title="The types module"><img alt="Next: The types module" 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="sect0089.html">Reference Manual</a> <b>:</b>
</span>
</span><span>
<span>
<a href="ch-function_list.html">List of in-built functions</a> <b>:</b>
</span>
</span><span>
<span>
<b class="current">The <tt class="ttfamily">time</tt> module</b>
</span>
</span>
<hr />
</div>
<div><h2 id="a0000000255">2.10 The <tt class="ttfamily">time</tt> module</h2>
<p>The <tt class="ttfamily">time</tt> module contains functions for handling objects of type <tt class="ttfamily">date</tt>. For more information about manipulating times and dates in Pyxplot, see Section <a href="sec-time_series.html">4.11</a>. Many of the functions below take an optional timezone string as their final argument. This should be specified in the form <tt class="tt">Europe/London</tt>, <tt class="tt">America/New_York</tt> or <tt class="tt">Australia/Perth</tt>, as used by the <tt class="tt">tz database</tt>. A complete list of available timezones can be found here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones. If universal time is used, the timezone may be specified as <tt class="tt">UTC</tt>. </p><p> <big class="large"><b class="bf">time.fromCalendar(<img src="images/img-0728.png" alt="$year,month,day,hour,min,sec,<timezone>$" style="vertical-align:-4px;
width:372px;
height:17px" class="math gen" />)</b></big> <br />The time.fromCalendar(<img src="images/img-0728.png" alt="$year,month,day,hour,min,sec,<timezone>$" style="vertical-align:-4px;
width:372px;
height:17px" class="math gen" />) function creates a date object from the specified calendar date. See also the <tt class="ttfamily">set calendar</tt> and <tt class="ttfamily">set timezone</tt> commands to change the current calendar and timezone. <a name="a0000001617" id="a0000001617"></a> </p><p> <big class="large"><b class="bf">time.fromJD(<img src="images/img-0065.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:12px" class="math gen" />)</b></big> <br />The time.fromJD(<img src="images/img-0065.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:12px" class="math gen" />) function creates a date object from the specified numerical Julian date. <a name="a0000001618" id="a0000001618"></a> </p><p> <big class="large"><b class="bf">time.fromMJD(<img src="images/img-0065.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:12px" class="math gen" />)</b></big> <br />The time.fromMJD(<img src="images/img-0065.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:12px" class="math gen" />) function creates a date object from the specified numerical modified Julian date. <a name="a0000001619" id="a0000001619"></a> </p><p> <big class="large"><b class="bf">time.fromUnix(<img src="images/img-0065.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:12px" class="math gen" />)</b></big> <br />The time.fromUnix(<img src="images/img-0065.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:12px" class="math gen" />) function creates a date object from the specified numerical Unix time. <a name="a0000001620" id="a0000001620"></a> </p><p> <big class="large"><b class="bf">time.interval(<img src="images/img-0729.png" alt="$t_2,t_1$" style="vertical-align:-4px;
width:35px;
height:16px" class="math gen" />)</b></big> <br />The time.interval(<img src="images/img-0729.png" alt="$t_2,t_1$" style="vertical-align:-4px;
width:35px;
height:16px" class="math gen" />) function returns the numerical time interval between date objects <img src="images/img-0730.png" alt="$t_1$" style="vertical-align:-2px;
width:13px;
height:14px" class="math gen" /> and <img src="images/img-0731.png" alt="$t_2$" style="vertical-align:-2px;
width:14px;
height:14px" class="math gen" />, with physical units of time. <a name="a0000001621" id="a0000001621"></a> </p><p> <big class="large"><b class="bf">time.intervalStr(<img src="images/img-0732.png" alt="$t_2,t_1,format$" style="vertical-align:-4px;
width:105px;
height:16px" class="math gen" />)</b></big> <br />The time.intervalStr(<img src="images/img-0732.png" alt="$t_2,t_1,format$" style="vertical-align:-4px;
width:105px;
height:16px" class="math gen" />) function returns a string representation of the time interval elapsed between the first and second supplied date objects. The third input is used to control the format of the output, with the following tokens being substituted for: </p><div>
<table cellspacing="0" class="tabular">
<tr>
<th style="border-top-style:solid; border-bottom-style:solid; border-bottom-width:1px; border-left:1px solid black; border-right:1px solid black; border-top-color:black; border-top-width:1px; border-bottom-color:black; text-align:left"><p>Token </p></th>
<th style="border-top-style:solid; border-bottom-style:solid; border-bottom-width:1px; border-bottom-color:black; border-right:1px solid black; border-top-color:black; border-top-width:1px; text-align:left"><p> Value </p></th>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%%</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> A literal % sign.</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%d</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> The number of days elapsed, modulo 365.</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%D</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> The number of days elapsed. </p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%h</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> The number of hours elapsed, modulo 24.</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%H</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> The number of hours elapsed.</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%m</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> The number of minutes elapsed, modulo 60.</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%M</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> The number of minutes elapsed.</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%s</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> The number of seconds elapsed, modulo 60.</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%S</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> The number of seconds elapsed.</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="tt">%Y</tt> </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> The number of years elapsed.</p></td>
</tr>
</table>
</div><p> <a name="a0000001622" id="a0000001622"></a> </p><p> <big class="large"><b class="bf">time.now()</b></big> <br />The time.now() function creates a date object representing the current time. <a name="a0000001623" id="a0000001623"></a> </p><p> <big class="large"><b class="bf">time.sleep(<img src="images/img-0065.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:12px" class="math gen" />)</b></big> <br />The time.sleep(<img src="images/img-0065.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:12px" class="math gen" />) function sleeps for <img src="images/img-0065.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:12px" class="math gen" /> seconds, or for time period <img src="images/img-0065.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:12px" class="math gen" /> if it has dimensions of time. <a name="a0000001624" id="a0000001624"></a> </p><p> <big class="large"><b class="bf">time.sleepUntil(<img src="images/img-0065.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:12px" class="math gen" />)</b></big> <br />The time.sleepUntil(<img src="images/img-0065.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:12px" class="math gen" />) function sleeps until the specified date and time. Its argument should be a date object. <a name="a0000001625" id="a0000001625"></a> </p><p> <big class="large"><b class="bf">time.string(<img src="images/img-0733.png" alt="$t,<format>,<timezone>$" style="vertical-align:-4px;
width:233px;
height:16px" class="math gen" />)</b></big> <br />The time.string(<img src="images/img-0733.png" alt="$t,<format>,<timezone>$" style="vertical-align:-4px;
width:233px;
height:16px" class="math gen" />) function returns a string representation of the specified date object <img src="images/img-0065.png" alt="$t$" style="vertical-align:0px;
width:6px;
height:12px" class="math gen" />. The second input is optional, and may be used to control the format of the output. If no format string is provided, then the format <br /><tt class="tt">"%a %Y %b %d %H:%M:%S"</tt><br />is used. In such format strings, the following tokens are substituted for various parts of the date: </p><div>
<table cellspacing="0" class="tabular">
<tr>
<th style="border-top-style:solid; border-bottom-style:solid; border-bottom-width:1px; border-left:1px solid black; border-right:1px solid black; border-top-color:black; border-top-width:1px; border-bottom-color:black; text-align:left"><p>Token </p></th>
<th style="border-top-style:solid; border-bottom-style:solid; border-bottom-width:1px; border-bottom-color:black; border-right:1px solid black; border-top-color:black; border-top-width:1px; text-align:left"><p> Value </p></th>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%%</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> A literal % sign.</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%a</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> Three-letter abbreviated weekday name.</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%A</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> Full weekday name.</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%b</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> Three-letter abbreviated month name.</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%B</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> Full month name.</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%C</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> Century number, e.g. 21 for the years 2000-2100.</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%d</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> Day of month.</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%H</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> Hour of day, in range 00-23.</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%I</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> Hour of day, in range 01-12.</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%k</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> Hour of day, in range 0-23.</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%l</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> Hour of day, in range 1-12.</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%m</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> Month number, in range 01-12.</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%M</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> Minute, in range 00-59.</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%p</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> Either <tt class="tt">am</tt> or <tt class="tt">pm</tt>.</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%S</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> Second, in range 00-59.</p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">%y</tt> </p></td>
<td style="text-align:left; border-right:1px solid black"><p> Last two digits of year number.</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="tt">%Y</tt> </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> Year number.</p></td>
</tr>
</table>
</div><p> <a name="a0000001626" id="a0000001626"></a> </p></div>
<div class="navigation">
<table cellspacing="2" cellpadding="0" width="100%">
<tr>
<td><a href="sect0253.html" title="The stats module"><img alt="Previous: The stats module" border="0" src="icons/previous.gif" width="32" height="32" /></a></td>
<td><a href="ch-function_list.html" title="List of in-built functions"><img alt="Up: List of in-built functions" border="0" src="icons/up.gif" width="32" height="32" /></a></td>
<td><a href="sec-functions_types.html" title="The types module"><img alt="Next: The types module" 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>
|