Siemens Milltronics EnviroRanger ERS 500 Manuel D'utilisation page 177

Table des Matières

Publicité

'whole days since 1/1/70
iday = Int(ihrs / 24)
'leftover hours
rhrs = ihrs - (iday * 24)
' whole days since 1/1/68
iday = iday + 365 + 366
' quadyr = 4 yr period = 1461 days
lday = Int(iday / ((4 * 365) + 1))
'days since current quadry began
qday = iday Mod ((4 * 365) + 1)
' if past feb 29 then add this quadyr's leap day to the # of quadyrs (leap
'days) since 1968
If (qday >= (31 + 29)) Then lday = lday + 1
' whole years since 1968
iyrs = Int((iday - lday) / 365)
' days since 1/1 of current year
jday = iday - (iyrs * 365) - lday
' if past 29 and a leap year then add a leap day to the # of whole
If ((qday <= 365) And (qday >= 60)) Then jday = jday + 1
' compute years
ryrs = iyrs + 1968
' estimate month (+1)
rmon = 13
' max days since 1/1 is 365
mday = 366
'mday = # of days passed from 1/1
Do While (jday < mday)
' estimated month
rmon = rmon - 1
'# elapsed days at first of mon
mday = datamon(rmon)
'if past 2/29 and leap year then add leap day month until found
If ((rmon > 2) And (ryrs Mod 4 = 0)) Then mday = mday + 1
Loop
' compute day of month
rday = jday - mday + 1
End Sub
7ML19981GL11
EnviroRanger ERS 500 – MANUEL D'UTILISATION
Page 167

Publicité

Table des Matières
loading

Table des Matières