| |
|
|
Michael W. |
Cls
' old to charge (Pi time thumb)
' The Konstanten respect too one bisserl on Schaltjahres-Gedöhns
' Startdatum, Endedatum
' though the XProfan-Time a others Startwert has (not year 0 separate 1900),
' is the difference similar and can therefore uses go.
' benefit with Time - the worth is accurate, if one too times angibt.
Proc Age
Parameters int T1,M1,J1, T2,M2,J2
Declare int T3,M3,J3, float f
Var float cJ = 365.2425
Var float cM = 30.4375
f = (J2 * cJ) + (M2 * cM) + T2
f = f - ((J1 * cJ) + (M1 * cM) + T1)'yields almost same difference How XProfan-Time
J3 = Int(f / cJ) : f = f - (cJ * J3)
M3 = Int(f / cM) : f = f - (cM * M3)
T3 = Int(f + 0.5)
Return J3' from Laziness becomes only Number of years supplied
ENDPROC
' xAge mind too The times (operates with Zeitpunkten; ex X2)
Proc xAge
Parameters float DatumAlt, DatumNeu
Declare int T,M,J, float f
Var float cJ = 365.2425
Var float cM = 30.4375
f = DatumNeu - DatumAlt
J = Int(f / cJ) : f = f - (cJ * J)
M = Int(f / cM) : f = f - (cM * M)
T = Int(f + 0.5)
Return stature$("%u J, ",J) + stature$("%u M, ",M) + stature$("%u T",T)
ENDPROC
Print "\n old to charge \n"
Print " Age: "; Age(27,12,1961, 18,3,2016)
Print "xAge: "; xAge( dt("SetDate", "27.12.1961"), dt("SetDate", "18.03.2016") )
WaitInput
End
|
|
|
| System: Windows 8/10, XProfan X4 Programmieren, das spannendste Detektivspiel der Welt. | 03/20/16 ▲ |
|
|
|