Last change
on this file since 9 was
9,
checked in by pinsard, 18 years ago
|
upgrade of CALENDRIER/Calendar according to cerbere.lodyc.jussieu.fr:/usr/home/smasson/SAXO_RD/ : files
|
-
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
|
Rev | Line | |
---|
[2] | 1 | ;------------------------------------------------------------ |
---|
| 2 | ;------------------------------------------------------------ |
---|
| 3 | ;------------------------------------------------------------ |
---|
| 4 | ;+ |
---|
| 5 | ; NAME:vraidate |
---|
| 6 | ; |
---|
[9] | 7 | ; PURPOSE:donne la date en long |
---|
[2] | 8 | ; |
---|
[9] | 9 | ; CATEGORY: |
---|
[2] | 10 | ; |
---|
[9] | 11 | ; CALLING SEQUENCE:res=vraidate(date) |
---|
[2] | 12 | ; |
---|
[9] | 13 | ; INPUTS:date:une date du type yyyymmdd |
---|
[2] | 14 | ; |
---|
| 15 | ; KEYWORD PARAMETERS: |
---|
| 16 | ; |
---|
[9] | 17 | ; /GRADS: if 1 le year le 49 then year = 2000+year |
---|
| 18 | ; if 50 le year le 99 then year = 1900+year |
---|
| 19 | ; |
---|
[2] | 20 | ; OUTPUTS:une date vairmer du type yyyymmdd |
---|
| 21 | ; |
---|
| 22 | ; SIDE EFFECTS:si year est nulle ou egale a -1 ne change rien |
---|
| 23 | ; |
---|
| 24 | ; EXAMPLE:vraidate(980703) donne 19980703 qui est un long |
---|
| 25 | ; |
---|
| 26 | ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr) |
---|
| 27 | ; 3/7/98 |
---|
[9] | 28 | ; remove automatic change from year 1 to 1901... Aug 2004 |
---|
[2] | 29 | ;- |
---|
| 30 | ;------------------------------------------------------------ |
---|
| 31 | ;------------------------------------------------------------ |
---|
| 32 | ;------------------------------------------------------------ |
---|
[9] | 33 | function vraidate, date, GRADS = grads, _EXTRA = ex |
---|
[2] | 34 | ;------------------------------------------------------------ |
---|
[9] | 35 | IF NOT keyword_set(GRADS) THEN return, long(date) |
---|
| 36 | ; |
---|
| 37 | date = long(date) |
---|
| 38 | annee = date/10000 |
---|
| 39 | return, date+19000000L*(annee GE 50 and date lt 1000000)+20000000L*(annee LT 50 and date lt 1000000) |
---|
[2] | 40 | ;------------------------------------------------------------ |
---|
| 41 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.