[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FT_DATECNFG()
 Set beginning of year/week for FT_ date functions
------------------------------------------------------------------------------

 Syntax

      FT_DATECNFG( [ <cFYStart> ], [ <nDow> ] ) -> aDateInfo

 Arguments

     <cFYStart> is a character date string in the user's system date
     format, i.e., the same as the user would enter for CTOD().  If
     this argument is NIL, the current value is unchanged.

     Note: The year portion of the date string must be present and
     be a valid year; however, it has no real meaning.

     <nDow> is a number from 1 to 7 (1 = Sunday) indicating the
     desired start of a work week.  If this argument is NIL,
     the current value is unchanged.

 Returns

     A 2-element array containing the following information:

        aDateInfo[1] - an ANSI date string indicating the beginning
                       date of the year.  Only the month and day are
                       meaningful.

        aDateInfo[2] - the number of the first day of the week
                       (1 = Sunday)

 Description

     FT_DATECNFG() is called internally by many of the date functions
     in the library to determine the beginning of year date and
     beginning of week day.

     The default beginning of the year is January 1st and the default
     beginning of the week is Sunday (day 1).  Either or both of these
     settings may be changed by calling FT_DATECNFG() with the proper
     arguments.  They will retain their values for the duration of the
     program or until they are changed again by a subsequent call to
     FT_DATECNFG().

     It is not necessary to call FT_DATECNFG() unless you need to
     change the defaults.

     FT_DATECNFG() affects the following library functions:

       FT_WEEK()       FT_ACCTWEEK()       FT_DAYTOBOW()
       FT_MONTH()      FT_ACCTMONTH()      FT_DAYOFYR()
       FT_QTR()        FT_ACCTQTR()        FT_ACCTADJ()
       FT_YEAR()       FT_ACCTYEAR()

 Examples

       // Configure library date functions to begin year on
       //  July 1st.

       FT_DATECNFG("07/01/80")    // year is insignificant

       // Examples of return values:

       //  System date format: American           aArray[1]    aArray[2]

       aArray := FT_DATECNFG()              //  '1980.01.01'     1 (Sun.)
       aArray := FT_DATECNFG('07/01/80')    //  '1980.07.01'     1 (Sun.)
       aArray := FT_DATECNFG('07/01/80', 2) //  '1980.07.01'     2 (Mon.)
       aArray := FT_DATECNFG( , 2 )         //  '1980.01.01'     2 (Mon.)

       //  System date format: British

       aArray := FT_DATECNFG('01/07/80', 2) //  '1980.07.01'     2 (Mon.)

 Source: DATECNFG.PRG

 Author: Jo W. French dba Practical Computing

See Also: FT_ACCTADJ()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson