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

Last change on this file since 134 was 134, checked in by navarro, 18 years ago

change *.pro file properties (del eof-style, del executable, set keywords Id

  • Property svn:keywords set to Id
File size: 971 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} julian day
12;
13; @returns date in yyyymmdd format
14;
15; @examples
16;
17; IDL> print, jul2date(julday(12,23,1999))
18;        19991223
19;
20; @history Sebastien Masson (smasson\@lodyc.jussieu.fr)
21;                       June 2005
22;
23; @version $Id$
24;
25;-
26;------------------------------------------------------------
27;------------------------------------------------------------
28;------------------------------------------------------------
29function jul2date, jday
30;
31  compile_opt idl2, strictarrsubs
32;
33
34  caldat, jday, month, day, year
35
36  res = (10000L*year + 100L*month + day)*(year GE 0) $
37        +( 10000L*year - 100L*month - day)*(year LT 0)
38
39  return, long(res)
40end
Note: See TracBrowser for help on using the repository browser.