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
RevLine 
[9]1;------------------------------------------------------------
2;------------------------------------------------------------
3;------------------------------------------------------------
4;+
5;
[126]6; @file_comments
7; gives yyyymmdd date equivalent of a julian day
[9]8;
[93]9; @categories calendar
[9]10;
[93]11; @param jday {in}{required} julian day
[9]12;
[93]13; @returns date in yyyymmdd format
[9]14;
[126]15; @examples
[9]16;
[126]17; IDL> print, jul2date(julday(12,23,1999))
[9]18;        19991223
19;
[93]20; @history Sebastien Masson (smasson\@lodyc.jussieu.fr)
[9]21;                       June 2005
[118]22;
23; @version $Id$
24;
[9]25;-
26;------------------------------------------------------------
27;------------------------------------------------------------
28;------------------------------------------------------------
29function jul2date, jday
[114]30;
31  compile_opt idl2, strictarrsubs
32;
[69]33
[9]34  caldat, jday, month, day, year
[69]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)
[9]40end
Note: See TracBrowser for help on using the repository browser.