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

Last change on this file since 370 was 327, checked in by pinsard, 16 years ago

modification of headers : mainly blanks around = sign for keywords in declaration of function and pro

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