| |
|
|
| iFs date-Vergleichsfunktionen
CompileMarkSeparationdef date_daynum(1) val(substr$(@$(1),1,"."))
def date_monthnum(1) val(substr$(@$(1),2,"."))
def date_yearnum(1) val(substr$(@$(1),3,"."))
def date_equyear(2) equ(date_yearnum(@$(1)),date_yearnum(@$(2)))
def date_equmonth(2) equ(date_monthnum(@$(1)),date_monthnum(@$(2)))
def date_equday(2) equ(date_daynum(@$(1)),date_daynum(@$(2)))
def date_equ(2) and( and(date_equyear(@$(1),@$(2)),date_equmonth(@$(1),@$(2))),date_equday(@$(1),@$(2)))
def date_yeardif(2) sub(date_yearnum(@$(2)),date_yearnum(@$(1)))
def date_monthdif(2) sub(date_monthnum(@$(2)),date_monthnum(@$(1)))
def date_daydif(2) sub(date_daynum(@$(2)),date_daynum(@$(1)))
proc date_past
parameters s$,ss$
declare yd%,md%,dd%
yd%=date_yeardif(s$,ss$)
case lt(yd%,0) : return 1
case gt(yd%,0) : return 0
md%=date_monthdif(s$,ss$)
case lt(md%,0) : return 1
case gt(md%,0) : return 0
dd%=date_daydif(s$,ss$)
case lt(Dd%,0) : return 1
RETURN 0
endproc
proc date_future
parameters s$,ss$
declare yd%,md%,dd%
case date_equ(s$,ss$) : return 0
date_past s$,ss$
case @%(0) : return 0
return 1
endproc
here becomes purposely NOT to the principle worked, one date in a Long umzuwandeln in order to vergleichen. |
|
|
| |
|
|
|
Sven Bader | >Hier becomes purposely NOT to the principle worked, one date in a Long umzuwandeln circa >zu vergleichen. >Salve, iF
Why? would be one schöner Einzeiler |
|
|
| |
|
|
|
| now simply because it this imho sufficient Examples gives and in the übrigen - I remember however not any more on whom background - could I in a bestehendem proposition not Longs separate only over Strings vergleichen. |
|
|
| |
|
|