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

Last change on this file since 378 was 371, checked in by pinsard, 16 years ago

improvements of headers (alignments of IDL prompt in examples)

  • Property svn:keywords set to Id
File size: 985 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;
24;   IDL> res=vraidate(date)
25;   IDL> vraidate(980703)
26; donne 19980703 qui est un long
27;
28; @history
29; Sebastien Masson (smasson\@lodyc.jussieu.fr)
30;   3/7/98
31; remove automatic change from year 1 to 1901... Aug 2004
32;
33; @version
34; $Id$
35;
36;-
37function vraidate, date, GRADS=grads, _EXTRA=ex
38;
39  compile_opt idl2, strictarrsubs, obsolete
40;
41  IF NOT keyword_set(GRADS) THEN return, long(date)
42;
43  date = long(date)
44  annee = date/10000
45  return, date+19000000L*(annee GE 50 and date lt 1000000)+20000000L*(annee LT 50 and date lt 1000000)
46;------------------------------------------------------------
47end
Note: See TracBrowser for help on using the repository browser.