Last change
on this file since 119 was
118,
checked in by pinsard, 18 years ago
|
add $ in Calendar, Grid, Interpolation, Obsolete and Postscript *.pro files, add svn:keywords Id to all these files, some improvements in header
|
-
Property svn:executable set to
*
-
Property svn:keywords set to
Id
|
File size:
973 bytes
|
Line | |
---|
1 | ;------------------------------------------------------------ |
---|
2 | ;------------------------------------------------------------ |
---|
3 | ;------------------------------------------------------------ |
---|
4 | ;+ |
---|
5 | ; |
---|
6 | ; @file_comments gives yyyymmdd date equivalent of a julian day |
---|
7 | ; |
---|
8 | ; @categories calendar |
---|
9 | ; |
---|
10 | ; @param jday {in}{required} julian day |
---|
11 | ; |
---|
12 | ; @returns date in yyyymmdd format |
---|
13 | ; |
---|
14 | ; @examples |
---|
15 | ; |
---|
16 | ; IDL> print, jul2date(julday(12,23,1999)) |
---|
17 | ; 19991223 |
---|
18 | ; |
---|
19 | ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) |
---|
20 | ; June 2005 |
---|
21 | ; |
---|
22 | ; @version $Id$ |
---|
23 | ; |
---|
24 | ;- |
---|
25 | ;------------------------------------------------------------ |
---|
26 | ;------------------------------------------------------------ |
---|
27 | ;------------------------------------------------------------ |
---|
28 | function jul2date, jday |
---|
29 | ; |
---|
30 | compile_opt idl2, strictarrsubs |
---|
31 | ; |
---|
32 | |
---|
33 | caldat, jday, month, day, year |
---|
34 | |
---|
35 | res = (10000L*year + 100L*month + day)*(year GE 0) $ |
---|
36 | +( 10000L*year - 100L*month - day)*(year LT 0) |
---|
37 | |
---|
38 | return, long(res) |
---|
39 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.