Last change
on this file since 338 was
327,
checked in by pinsard, 17 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
|
Rev | Line | |
---|
[2] | 1 | ;+ |
---|
[232] | 2 | ; |
---|
[127] | 3 | ; @file_comments |
---|
| 4 | ; donne la date en long |
---|
| 5 | ; |
---|
[97] | 6 | ; @obsolete |
---|
[2] | 7 | ; |
---|
[231] | 8 | ; @param date {in}{required} |
---|
| 9 | ; une date du type yyyymmdd |
---|
[2] | 10 | ; |
---|
[231] | 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 |
---|
[9] | 14 | ; |
---|
[231] | 15 | ; @keyword _EXTRA |
---|
| 16 | ; Used to pass keywords |
---|
[118] | 17 | ; |
---|
[231] | 18 | ; @returns |
---|
| 19 | ; une date vairmer du type yyyymmdd |
---|
[97] | 20 | ; si year est nulle ou egale a -1 ne change rien |
---|
[2] | 21 | ; |
---|
[118] | 22 | ; @examples |
---|
[97] | 23 | ; IDL> res=vraidate(date) |
---|
[118] | 24 | ; IDL> vraidate(980703) |
---|
[97] | 25 | ; donne 19980703 qui est un long |
---|
[2] | 26 | ; |
---|
[231] | 27 | ; @history |
---|
| 28 | ; Sebastien Masson (smasson\@lodyc.jussieu.fr) |
---|
[97] | 29 | ; 3/7/98 |
---|
[9] | 30 | ; remove automatic change from year 1 to 1901... Aug 2004 |
---|
[118] | 31 | ; |
---|
[231] | 32 | ; @version |
---|
| 33 | ; $Id$ |
---|
[118] | 34 | ; |
---|
[2] | 35 | ;- |
---|
[327] | 36 | function vraidate, date, GRADS=grads, _EXTRA=ex |
---|
[114] | 37 | ; |
---|
| 38 | compile_opt idl2, strictarrsubs, obsolete |
---|
| 39 | ; |
---|
[9] | 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) |
---|
[2] | 45 | ;------------------------------------------------------------ |
---|
| 46 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.