| dadlldate_time |  |
| DLL Usage description Library: dadlldate_time This library contains common functionality that operates on date and time fields, values and constants DLL Prototypes
     function extern date.const.disp.to.store(
             domain daxch.dfor dfor,
             const string disp.field(),
             ref string store.field())
     pre   : true post  : store.field contains the value of disp.field as it should
    be
            stored desc: : - expression with # will be copied unchanged
            - formatted date will be converted to a datenumber
              (converted to a string)
     function extern long date.const.enter.to.disp(
             domain daxch.dfor dfor,
             ref string disp.field())
     pre   : true return: whether disp.field is a valid date constant post  : ret =
    true  ==> disp.field will contain the value as
            old(disp.field) should be displayed
            ret = false ==> disp.field will be left unchanged desc  : a correctly
    entered date constant should be displayed as
            follows: - date.num() will be replaced by #
                     - [(+-)[n]] will be displayed by the indicated date
                       (formatted)
                     - formatted dates will be displayed unchanged
     function extern date.const.store.to.disp(
             domain daxch.dfor dfor,
             const string store.field(),
             ref string disp.field())
     pre   : true post  : disp.field contains the value of store.field as it should
          : be displayed: desc  : - expression with # will be copied unchanged
            - a datenumber will be converted to a formatted date
             (converted to a string)
     function extern long date.to.format(
             domain daxch.dfor dfor,
             long ndate )
     pre   : true return: dfor and ndate are valid ==> the formatted date
    representation
                                         of ndate
            otherwise ==> ndate (ndate is regarded to be a date number)
     function extern string datestr.to.formatstr(
             domain daxch.dfor dfor,
             const string sdate() )
     pre   : true return: dfor and sdate are valid ==> the formatted date
    representation
                                         of sdate (converted to a string)
            otherwise ==> sdate (sdate is regarded to be the string
                          representation of a date number)
     function extern long format.to.date(
             domain daxch.dfor dfor,
             long fdate )
     pre   : true return: dfor and fdate are valid ==> the date number of fdate
            otherwise ==> fdate desc  : if the year is in YY format the century must
    be guessed:
            YY < 50 then 21st century else 20th century
     function extern string formatstr.to.datestr(
             domain daxch.dfor dfor,
             const string sfdate())
     pre   : true return: dfor is valid and sfdate is valid ==> the date number of
    fdate
                                                  as a string
            otherwise ==> str$(lval(sfdate)) (this might loose information) desc  :
    if the year is in YY format the century must be guessed:
            YY < 50 then 21st century else 20th century
     function extern long get.date.format.length(domain daxch.dfor dfor)
     pre   : true return: the length of a date according to dfor,
             - 6 for a date number and a format with YY
             - 8 for a format with YYYY
             - 0 for an invalid format
     function extern get.next.interval(
             ref domain daxch.utc date.f,
             ref domain daxch.utc date.t )
     pre   : the parameters denote a time-interval post  : the parameters contain
    the next interval, ie the interval
            starting at the end of the given interval and having the same
            length as the given one, or more 'precise':
            - date.f = old(date.t) AND
            - date.t = date.f + ( old(date.t) - old(date.f))
     function extern long hhmmss.to.secs(long hhmmss)
     return: hhmmss converted to # seconds since midnight
     function extern long secs.to.hhmmss(long secs)
     return:  secs (the number of seconds since midnight) converted to hhmmss
     function extern long utc.date.and.time.to.utc(
             domain daxch.date date,
             domain daxch.time time,
             ref domain daxch.utc utc.date )
     pre   : date and time contain a utc date/time;
            format of date: date number, format of time: hhmmss. return: True if the
    utc date was converted successfully. post  : If return then utc.date contains
    the same date/time
            as date and time, but in utc format. note  : No conversion from local
    time to utc is done;
            only the date and time are reformatted into a single
            utc variable.
     function extern long utc.to.utc.date.and.time(
             domain daxch.utc utc.date,
             ref domain daxch.date date,
             ref domain daxch.time time)
     pre   : utc.date is a date in utc format. return: True if the utc date was
    converted successfully. post  :If return then date and time contain the same
    date/time
           as utc.date, but in a different format:
           format of date: date number, format of time: hhmmss. note  :No conversion
    from utc to local time is done;
           only the utc.date is split up into two variables, because
           the audit server uses a separate date and time.
Related topics Libraries |