Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Nanforum Toolkit v2.1 Reference Guide - <b>ft_addwkdy()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FT_ADDWKDY()
 Return true number of days to add given number of workdays
------------------------------------------------------------------------------

 Syntax

      FT_ADDWKDY( <dStart>, <nWorkDays> ) -> nTrueDays

 Arguments

     <dStart> = date to start adding from
     <nWorkDays> = number of workdays to add

 Returns

     <nTrueDays> = Number of actual days to add to <dStart> in
                   order to add the required <nWorkDays>

 Description

      Let's say you are given the problem:

         "All invoices are due 10 working days from the date they
         are printed.  Please display the due date on the invoice."

      When is the due date?  Assuming you are printing the invoices
      today, your answer is:

           dDueDate := DATE() + ft_addWkDay( DATE(), 10 )

      A work day is defined as Monday through Friday.  Unfortunately
      this routine does _not_ account for holidays.

      This documentation was written by Glenn Scott so if it's wrong,
      blame him.

 Examples

      // Postdate 5 working days from the first of January
      dPost := CTOD("01/01/91")
      dPost += FT_ADDWKDY( dPost, 5 )   // returns 7 true days
      ? dPost                          //  01/08/91


 Source: WDA.PRG

 Author: Eric Splaver

See Also: FT_WORKDAYS()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson