source: trunk/SRC/Obsolete/vraidate.pro @ 97

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

start to modify headers of Obsolete *.pro files for better idldoc output

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
Line 
1;------------------------------------------------------------
2;------------------------------------------------------------
3;------------------------------------------------------------
4;+
5; @file_comments donne la date en long
6; @obsolete
7;
8;
9; @param date {in}{required} une date du type yyyymmdd
10;
11;  @keyword /GRADS if  1 le year le 49 then year = 2000+year
12;               if 50 le year le 99 then year = 1900+year
13;
14; @returns une date vairmer du type yyyymmdd
15; si year est nulle ou egale a -1 ne change rien
16;
17; @examples
18; IDL> res=vraidate(date)
19; IDL> vraidate(980703)
20; donne 19980703 qui est un long
21;
22; @history Sebastien Masson (smasson\@lodyc.jussieu.fr)
23;   3/7/98
24; remove automatic change from year 1 to 1901... Aug 2004
25;-
26;------------------------------------------------------------
27;------------------------------------------------------------
28;------------------------------------------------------------
29function vraidate, date, GRADS = grads, _EXTRA = ex
30;------------------------------------------------------------
31  IF NOT keyword_set(GRADS) THEN return, long(date)
32;
33  date = long(date)
34  annee = date/10000
35  return, date+19000000L*(annee GE 50 and date lt 1000000)+20000000L*(annee LT 50 and date lt 1000000)
36;------------------------------------------------------------
37end
Note: See TracBrowser for help on using the repository browser.