1 subroutine dmjohe ( numann, nummoi, numjou, numjos,
2 > numheu, nummin, numsec )
3 c ______________________________________________________________________
7 c Outil de Maillage Adaptatif par Raffinement et Deraffinement d'EDF R&D
9 c Version originale enregistree le 18 juin 1996 sous le numero 96036
10 c aupres des huissiers de justice Simart et Lavoir a Clamart
11 c Version 11.2 enregistree le 13 fevrier 2015 sous le numero 2015/014
12 c aupres des huissiers de justice
13 c Lavoir, Silinski & Cherqui-Abrahmi a Clamart
15 c HOMARD est une marque deposee d'Electricite de France
21 c ______________________________________________________________________
22 c Dependance Machine : JOur et HEure
24 c ______________________________________________________________________
27 c retourne la date et l'heure
28 c ______________________________________________________________________
30 c . nom . e/s . taille . description .
31 c .____________________________________________________________________.
32 c . numann . s . 1 . numero de l'annee .
33 c . nummoi . s . 1 . numero du mois .
34 c . numjou . s . 1 . numero du jour (1-->31) .
35 c . numjos . s . 1 . numero du jour symbolique (0-->7) .
36 c . . . . 0 : rien n'est fourni par la machine .
37 c . . . . 1-->7 : numero du jour dans la semaine .
38 c . numheu . s . 1 . numero de l'heure .
39 c . nummin . s . 1 . numero des minutes .
40 c . numsec . s . 1 . numero des secondes .
41 c ______________________________________________________________________
44 c 0. declarations et dimensionnement
47 c 0.1. ==> generalites
52 cgn character*6 nompro
53 cgn parameter ( nompro = 'DMJOHE' )
59 integer numann, nummoi, numjou, numjos
60 integer numheu, nummin, numsec
62 c 0.4. ==> variables locales
67 character*8 chjour, heurus
69 character*3 tabday (7)
70 character*3 tabmon (12)
71 character*3 nomjou, nommoi
76 c 1.1. ==> nom des jours
86 c 1.2. ==> nom des mois
102 c 2. determination de la date et de l'heure de passage du calcul
107 tampon = 'Thu Jul 19 9:42:23 1994'
110 c sur machine UNIX ou WINDOWS de base
111 c 1234567890123456789012345678
112 c 'day mon dd hh:mm:ss yyyy'
113 c ex : 'Thu Jul 19 9:42:23 1994'
116 c 2.1. ==> appel a la fonction machine
118 call dmdate ( tampon )
120 c 2.2. ==> archivage sous forme standard
122 nomann = tampon(21:24)
125 chjour(4:5) = tampon(9:10)
127 heurus = tampon(12:19)
130 c 3. decodage commun a toutes les machines
133 if ( index('0123456789',nomann(3:3)).gt.0 .and.
134 > index('0123456789',nomann(4:4)).gt.0 ) then
136 read ( nomann(3:4) , fmt='(i2)' ) numann
138 if (nomann(1:2).eq.'19') then
139 numann = numann + 1900
141 numann = numann + 2000
147 if ( chjour(4:4).eq.' ' ) then
150 if ( index('0123',chjour(4:4)).gt.0 .and.
151 > index('0123456789',chjour(5:5)).gt.0 ) then
153 read ( chjour(4:5) , fmt='(i2)' ) numjou
155 if ( numjou.le.0 .or. numjou.gt.31 ) then
158 else if ( chjour(5:5).eq.' ' .and.
159 > index('123456789',chjour(4:4)).gt.0 ) then
161 read ( chjour(4:4) , fmt='(i1)' ) numjou
167 c apres la date, on s'occupe maintenant de l'heure :
169 if ( heurus(1:1).eq.' ' ) then
172 if ( index('012',heurus(1:1)).gt.0 .and.
173 > index('0123456789',heurus(2:2)).gt.0 ) then
175 read ( heurus(1:2),fmt='(i2)' ) numheu
177 if (numheu.gt.23) then
181 else if ( heurus(2:2).eq.' ' .and.
182 > index('0123456789',heurus(1:1)).gt.0 ) then
184 read ( heurus(1:1),fmt='(i1)' ) numheu
192 if ( index(' 012345',heurus(4:4)).gt.0 .and.
193 > index('0123456789',heurus(5:5)).gt.0 ) then
195 read ( heurus(4:5),fmt='(i2)' ) nummin
197 if (nummin.gt.59) then
201 else if ( heurus(5:5).eq.' ' .and.
202 > index('0123456789',heurus(4:4)).gt.0 ) then
204 read ( heurus(4:4),fmt='(i1)' ) nummin
212 if ( index(' 012345',heurus(7:7)).gt.0 .and.
213 > index('0123456789',heurus(8:8)).gt.0 ) then
215 read ( heurus(7:8),fmt='(i2)' ) numsec
217 if (numsec.gt.59) then
221 else if ( heurus(8:8).eq.' ' .and.
222 > index('0123456789',heurus(7:7)).gt.0 ) then
224 read ( heurus(7:7),fmt='(i1)' ) numsec
233 c 4. decodages specifiques
234 c . nummoi = numero du mois
235 c . numjos = numero du jour dans la semaine
239 do 41 , iaux = 1 , 12
240 if ( nommoi .eq. tabmon(iaux) ) then
247 if ( nomjou .eq. tabday(iaux) ) then
252 if (numjou.gt.28 .and. nummoi.gt.1) then
253 if (nummoi.eq.2 .and. mod(numann,4).ne.0) then
255 else if (nummoi.eq.2 .and. mod(numann,4).eq.0) then
256 if (numjou.gt.29) then
259 else if (nummoi.eq.4 .or. nummoi.eq.6) then
260 if (numjou.gt.30) then
263 else if (nummoi.eq.9 .or. nummoi.eq.11) then
264 if (numjou.gt.30) then