1 | |
---|
2 | |
---|
3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
---|
4 | <head> |
---|
5 | <title>julday.pro (SAXO Documentation Assistant)</title> |
---|
6 | </head> |
---|
7 | |
---|
8 | <body text="#000000" bgcolor="#FFFFFF"> |
---|
9 | |
---|
10 | |
---|
11 | <!-- Navbar template takes a structure with the following fields: |
---|
12 | overview_href : |
---|
13 | overview_selected : |
---|
14 | dir_overview_href : |
---|
15 | dir_overview_selected : |
---|
16 | categories_href : |
---|
17 | categories_selected : |
---|
18 | index_href : |
---|
19 | index_selected : |
---|
20 | search_href : |
---|
21 | search_selected : |
---|
22 | file_selected : |
---|
23 | source_href : |
---|
24 | source_selected : |
---|
25 | help_href : |
---|
26 | help_selected : |
---|
27 | etc_selected : |
---|
28 | |
---|
29 | prev_file_href : |
---|
30 | next_file_href : |
---|
31 | |
---|
32 | view_single_page_href : |
---|
33 | view_frames_href : |
---|
34 | |
---|
35 | summary_fields_href : |
---|
36 | summary_routine_href : |
---|
37 | details_routine_href : |
---|
38 | |
---|
39 | title : |
---|
40 | subtitle : |
---|
41 | user : |
---|
42 | --> |
---|
43 | |
---|
44 | |
---|
45 | <table border="0" cellpadding="0" cellspacing="0" width="98%" bgcolor="#F0F0FF" valign="bottom"> |
---|
46 | <tr> |
---|
47 | <td width="10%"> |
---|
48 | <a href="jul2date.html"><img src="./../prev.gif" border="0" alt="Previous"></a></td> |
---|
49 | <td width="80%" align="center" valign="center"> |
---|
50 | <font size=-1><i>SAXO Documentation Assistant</i>: <a href="./../home.html">Overview</a></font></td> |
---|
51 | <td width="10%" align="right"> |
---|
52 | <a href="leapyr.html"><img src="./../next.gif" border="0" alt="Next"></a></td> |
---|
53 | </tr> |
---|
54 | </table> |
---|
55 | |
---|
56 | |
---|
57 | <h1><font size="-2">Calendar/</font></h1> |
---|
58 | <h2>julday.pro</h2> |
---|
59 | |
---|
60 | <dl> |
---|
61 | </dl> |
---|
62 | |
---|
63 | |
---|
64 | Calculate the Julian Day Number for a given month, day, and year. |
---|
65 | This is the inverse of the library function <a href="..//Calendar/caldat.html">caldat</a>. |
---|
66 | 3 calendars are available according to the value of key_caltype |
---|
67 | (variable of the common file cm_4cal): 'greg', '360d', 'noleap' |
---|
68 | |
---|
69 | |
---|
70 | |
---|
71 | |
---|
72 | |
---|
73 | <a name="#_julday"></a> |
---|
74 | |
---|
75 | <h2>julday <font size="-1" color="#006633"> |
---|
76 | Calendar |
---|
77 | </font></h2> |
---|
78 | |
---|
79 | <p><font face="Courier"><i>result = </i>julday(<i>[<a href="#_julday_keyword_month">month</a>][, <a href="#_julday_keyword_day">day</a>][, <a href="#_julday_keyword_yearin">yearin</a>][, <a href="#_julday_keyword_hour">hour</a>][, <a href="#_julday_keyword_minute">minute</a>][, <a href="#_julday_keyword_second">second</a>]</i>, <a href="#_julday_keyword_NDAYSPM">NDAYSPM</a>=<i>integer</i>)</font></p> |
---|
80 | |
---|
81 | |
---|
82 | |
---|
83 | |
---|
84 | <h3>Return value</h3> |
---|
85 | the Julian Day Number (which begins at noon) of the specified calendar date. |
---|
86 | If Hour, Minute, and Second are not specified, then the result will be a |
---|
87 | long integer, otherwise the result is a double precision floating point |
---|
88 | number. |
---|
89 | |
---|
90 | |
---|
91 | |
---|
92 | <h3>Parameters</h3> |
---|
93 | |
---|
94 | |
---|
95 | <a name="#_julday_keyword_month"></a> |
---|
96 | <h4>month |
---|
97 | <font size="-1" color="#006633">in</font> |
---|
98 | |
---|
99 | <font size="-1" color="#006633">optional</font> |
---|
100 | |
---|
101 | |
---|
102 | <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>scalar (integer or double) or array of scalars</i></font> |
---|
103 | |
---|
104 | |
---|
105 | </h4> |
---|
106 | |
---|
107 | |
---|
108 | Number of the desired month (1 = January, ..., 12 = December). |
---|
109 | |
---|
110 | |
---|
111 | |
---|
112 | <a name="#_julday_keyword_day"></a> |
---|
113 | <h4>day |
---|
114 | <font size="-1" color="#006633">in</font> |
---|
115 | |
---|
116 | <font size="-1" color="#006633">optional</font> |
---|
117 | |
---|
118 | |
---|
119 | <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>scalar (integer or double) or array of scalars</i></font> |
---|
120 | |
---|
121 | |
---|
122 | </h4> |
---|
123 | |
---|
124 | |
---|
125 | Number of day of the month. |
---|
126 | |
---|
127 | |
---|
128 | |
---|
129 | <a name="#_julday_keyword_yearin"></a> |
---|
130 | <h4>yearin |
---|
131 | <font size="-1" color="#006633">in</font> |
---|
132 | |
---|
133 | <font size="-1" color="#006633">optional</font> |
---|
134 | |
---|
135 | |
---|
136 | <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>scalar (integer or double) or array of scalars</i></font> |
---|
137 | |
---|
138 | |
---|
139 | </h4> |
---|
140 | |
---|
141 | |
---|
142 | Number of the desired year.Year parameters must be valid |
---|
143 | values from the civil calendar. Years B.C.E. are represented |
---|
144 | as negative integers. Years in the common era are represented |
---|
145 | as positive integers. In particular, note that there is no |
---|
146 | year 0 in the civil calendar. 1 B.C.E. (-1) is followed by |
---|
147 | 1 C.E. (1). |
---|
148 | Change: However for climatological year, we do accept the year |
---|
149 | 0 but we change it for year 654321L (the same trick is done in |
---|
150 | <a href="..//Calendar/caldat.html">caldat</a> so caldat, julday(1,1,0) gives you back Jan 1st of year 0) |
---|
151 | |
---|
152 | |
---|
153 | |
---|
154 | <a name="#_julday_keyword_hour"></a> |
---|
155 | <h4>hour |
---|
156 | <font size="-1" color="#006633">in</font> |
---|
157 | |
---|
158 | <font size="-1" color="#006633">optional</font> |
---|
159 | |
---|
160 | |
---|
161 | <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>scalar (integer or double) or array of scalars</i></font> |
---|
162 | <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>12</i></font> |
---|
163 | |
---|
164 | </h4> |
---|
165 | |
---|
166 | |
---|
167 | Number of the hour of the day. |
---|
168 | |
---|
169 | |
---|
170 | |
---|
171 | <a name="#_julday_keyword_minute"></a> |
---|
172 | <h4>minute |
---|
173 | <font size="-1" color="#006633">in</font> |
---|
174 | |
---|
175 | <font size="-1" color="#006633">optional</font> |
---|
176 | |
---|
177 | |
---|
178 | <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>scalar (integer or double) or array of scalars</i></font> |
---|
179 | <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>0</i></font> |
---|
180 | |
---|
181 | </h4> |
---|
182 | |
---|
183 | |
---|
184 | Number of the minute of the hour. |
---|
185 | |
---|
186 | |
---|
187 | |
---|
188 | <a name="#_julday_keyword_second"></a> |
---|
189 | <h4>second |
---|
190 | <font size="-1" color="#006633">in</font> |
---|
191 | |
---|
192 | <font size="-1" color="#006633">optional</font> |
---|
193 | |
---|
194 | |
---|
195 | <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>scalar (integer or double) or array of scalars</i></font> |
---|
196 | <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>0</i></font> |
---|
197 | |
---|
198 | </h4> |
---|
199 | |
---|
200 | |
---|
201 | Number of the second of the minute. |
---|
202 | |
---|
203 | |
---|
204 | |
---|
205 | |
---|
206 | |
---|
207 | <h3>Keywords</h3> |
---|
208 | |
---|
209 | |
---|
210 | <a name="#_julday_keyword_NDAYSPM"></a> |
---|
211 | <h4>NDAYSPM |
---|
212 | |
---|
213 | |
---|
214 | |
---|
215 | |
---|
216 | |
---|
217 | <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>integer</i></font> |
---|
218 | <font size="-1" color="#006633">default:</font> <font size="-1" color="#006633"><i>30</i></font> |
---|
219 | |
---|
220 | </h4> |
---|
221 | |
---|
222 | |
---|
223 | To use a calendar with fixed number of days per month. |
---|
224 | see also the use of key_caltype (variable of the common file cm_4cal) |
---|
225 | |
---|
226 | |
---|
227 | |
---|
228 | |
---|
229 | |
---|
230 | </pre><h3>Version history</h3> |
---|
231 | |
---|
232 | <h4>Version</h4> |
---|
233 | $Id: julday.pro 327 2007-12-13 16:22:35Z pinsard $ |
---|
234 | <h4>History</h4> |
---|
235 | Translated from "Numerical Recipes in C", by William H. Press, |
---|
236 | Brian P. Flannery, Saul A. Teukolsky, and William T. Vetterling. |
---|
237 | Cambridge University Press, 1988 (second printing). |
---|
238 | |
---|
239 | AB, September, 1988 |
---|
240 | DMS, April, 1995, Added time of day. |
---|
241 | |
---|
242 | Eric Guilyardi, June 1999 |
---|
243 | Added key_work ndayspm for fixed number of days per months |
---|
244 | |
---|
245 | CT, April 2000, Now accepts vectors or scalars. |
---|
246 | |
---|
247 | Sebastien Masson, Aug. 2003 |
---|
248 | fix bug for negative and large values of month values |
---|
249 | eg. julday(349,1,1970) |
---|
250 | |
---|
251 | Sebastien Masson, May 2006, add different calendat with key_caltype |
---|
252 | (variable of the common file cm_4cal) |
---|
253 | |
---|
254 | |
---|
255 | |
---|
256 | <h3>Known issues</h3> |
---|
257 | |
---|
258 | |
---|
259 | |
---|
260 | <h4>Restrictions</h4> |
---|
261 | The result will have the same dimensions as the smallest array, or |
---|
262 | will be a scalar if all arguments are scalars. |
---|
263 | |
---|
264 | |
---|
265 | Accuracy using IEEE double precision numbers is approximately |
---|
266 | 1/10000th of a second, with higher accuracy for smaller (earlier) |
---|
267 | Julian dates. |
---|
268 | |
---|
269 | |
---|
270 | <h3>Other attributes</h3> |
---|
271 | |
---|
272 | |
---|
273 | <h4>Uses routines</h4> |
---|
274 | cm_4cal |
---|
275 | |
---|
276 | |
---|
277 | |
---|
278 | |
---|
279 | |
---|
280 | <font size="-3"><p> </p></font> |
---|
281 | <hr size="1" color="#CCCCCC"/> |
---|
282 | |
---|
283 | |
---|
284 | |
---|
285 | |
---|
286 | <p><font color="gray" size="-3"> Produced by IDLdoc 2.0.</font></p> |
---|
287 | |
---|
288 | </body> |
---|
289 | </html> |
---|