English
Source / code snippets

date Vergleichsfunktionen

 
iFs date-Vergleichsfunktionen

CompileMarkSeparation
def 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.
 
06/02/04  
 




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
 
06/12/06  
 



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.
 
06/12/06  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.588 Views

Untitledvor 0 min.
H.Brill10/09/21
Torben Nissen04/16/21
Walter10/23/19
PETER195607/18/18
More...

Themeninformationen

this Topic has 3 subscriber:

Sven Bader (1x)
iF (1x)
unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie