source: trunk/SRC/Calendar/jul2date.pro @ 136

Last change on this file since 136 was 136, checked in by pinsard, 18 years ago

some improvements and corrections in some .pro file according to
aspell and idldoc log file

  • Property svn:keywords set to Id
File size: 977 bytes
Line 
1;------------------------------------------------------------
2;------------------------------------------------------------
3;------------------------------------------------------------
4;+
5;
6; @file_comments
7; gives yyyymmdd date equivalent of a Julian day
8;
9; @categories calendar
10;
11; @param jday {in}{required}
12; Julian day
13;
14; @returns
15; date in yyyymmdd format
16;
17; @examples
18;
19; IDL> print, jul2date(julday(12,23,1999))
20;        19991223
21;
22; @history Sebastien Masson (smasson\@lodyc.jussieu.fr)
23;                       June 2005
24;
25; @version $Id$
26;
27;-
28;------------------------------------------------------------
29;------------------------------------------------------------
30;------------------------------------------------------------
31function jul2date, jday
32;
33  compile_opt idl2, strictarrsubs
34;
35
36  caldat, jday, month, day, year
37
38  res = (10000L*year + 100L*month + day)*(year GE 0) $
39        +( 10000L*year - 100L*month - day)*(year LT 0)
40
41  return, long(res)
42end
Note: See TracBrowser for help on using the repository browser.