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

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

header improvements + xxx doc

  • Property svn:keywords set to Id
File size: 732 bytes
Line 
1;------------------------------------------------------------
2;+
3;
4; @file_comments
5; gives yyyymmdd date equivalent of a Julian day
6;
7; @categories
8; Calendar
9;
10; @param jday {in}{required}
11; Julian day
12;
13; @returns
14; date in yyyymmdd format
15;
16; @examples
17;
18; IDL> print, jul2date(julday(12,23,1999))
19;        19991223
20;
21; @history Sebastien Masson (smasson\@lodyc.jussieu.fr)
22;                       June 2005
23;
24; @version $Id$
25;
26;-
27;------------------------------------------------------------
28function 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)
39end
Note: See TracBrowser for help on using the repository browser.