Last change
on this file since 2 was
2,
checked in by opalod, 22 years ago
|
Initial revision
|
-
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 | ; NAME:vraidate |
---|
6 | ; |
---|
7 | ; PURPOSE:donne la date en long et avec le siecle s'il n'est pas specifie. |
---|
8 | ; |
---|
9 | ; CATEGORY:compatibile an 2000 bien-sur |
---|
10 | ; |
---|
11 | ; CALLING SEQUENCE:res=varidate(date) |
---|
12 | ; |
---|
13 | ; INPUTS:date:une date vairmer du type yymmdd ou yyyymmdd |
---|
14 | ; |
---|
15 | ; KEYWORD PARAMETERS: |
---|
16 | ; VRAIDATE: pour ne pasa transformer l''annnee 01 en 1901 |
---|
17 | ; |
---|
18 | ; OUTPUTS:une date vairmer du type yyyymmdd |
---|
19 | ; |
---|
20 | ; SIDE EFFECTS:si year est nulle ou egale a -1 ne change rien |
---|
21 | ; |
---|
22 | ; EXAMPLE:vraidate(980703) donne 19980703 qui est un long |
---|
23 | ; |
---|
24 | ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr) |
---|
25 | ; 3/7/98 |
---|
26 | ;- |
---|
27 | ;------------------------------------------------------------ |
---|
28 | ;------------------------------------------------------------ |
---|
29 | ;------------------------------------------------------------ |
---|
30 | function vraidate, date, VRAIDATE = vraidate, _EXTRA = ex |
---|
31 | ;------------------------------------------------------------ |
---|
32 | date=long(date) |
---|
33 | annee=date/10000 |
---|
34 | if keyword_set(VRAIDATE) then return, date ELSE $ |
---|
35 | return, date+19000000*(annee ne 0 and annee ne -1 and date lt 1000000 and date GT 0) |
---|
36 | ;------------------------------------------------------------ |
---|
37 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.