FT_YEAR

FT_YEAR()
 Return calendar or fiscal year data

 Syntax

      FT_YEAR( [ <dGivenDate> ] ) -> aDateInfo

 Arguments

     <dGivenDate> is any valid date in any date format.  Defaults
     to current system date if not supplied.

 Returns

     A three element array containing the following data:

        aDateInfo[1] - The year as a character string "YYYY"
        aDateInfo[2] - The beginning date of the year
        aDateInfo[3] - The ending date of the year

 Description

     FT_YEAR() returns an array containing data about the year
     containing the given date.

     Normally the return data will be based on a year beginning
     on January 1st.

     The beginning of year date can be changed by using FT_DATECNFG(),
     which will affect all subsequent calls to FT_YEAR() until another
     call to FT_DATECNFG().

     The beginning of year date may be reset to January 1 by calling
     FT_DATECNFG() with no parameters.

 Examples

     // Get info about year containing 9/15/90, assuming default
     // beginning of year is January 1st.
     aDateInfo := FT_YEAR( Ctod("09/15/90") )
     ? aDateInfo[1]   //  1990
     ? aDateInfo[2]   //  01/01/90     beginning of year
     ? aDateInfo[3]   //  12/31/90     end of year

     // get info about current year (1991).
     aDateInfo := FT_YEAR()
     ? aDateInfo[1]   //  1991
     ? aDateInfo[2]   //  01/01/91   beginning of year
     ? aDateInfo[3]   //  12/31/91   end of year

 Source: YEAR.PRG

 Author: Jo W. French dba Practical Computing

See Also: FT_DATECNFG() FT_WEEK() FT_MONTH() FT_QTR()

FT_QTR

FT_QTR()
 Return Calendar or Fiscal Quarter Data.

 Syntax

      FT_QTR( [ <dGivenDate> ], [ <nQtrNum> ] ) -> aDateInfo

 Arguments

     <dGivenDate> is any valid date in any date format.  Defaults
     to current system date if not supplied.

     <nQtrNum> is a number from 1 to 4 signifying a quarter.
     Defaults to current quarter if not supplied.

 Returns

     A three element array containing the following data:

        aDateInfo[1] - The year and quarter as a character string "YYYYQQ"
        aDateInfo[2] - The beginning date of the quarter
        aDateInfo[3] - The ending date of the quarter

 Description

     FT_QTR() returns an array containing data about the quarter
     containing the given date.

     Normally the return data will be based on a year beginning
     on January 1st with weeks beginning on Sunday.

     The beginning of year date and/or beginning of week day can be
     changed by using FT_DATECNFG(), which will affect all subsequent
     calls to FT_QTR() until another call to FT_DATECNFG().

     The beginning of year date and beginning of week day may be reset
     to January 1 and Sunday by calling FT_DATECNFG() with no
     parameters.

 Examples

     // get info about quarter containing 9/15/90
     aDateInfo := FT_QTR( CTOD("09/15/90") )
     ? aDateInfo[1]   //  199003       (3rd quarter)
     ? aDateInfo[2]   //  07/01/90     beginning of quarter 3
     ? aDateInfo[3]   //  09/30/90     end of week quarter 3

     // get info about quarter 2 in year containing 9/15/90
     aDateInfo := FT_QTR( CTOD("09/15/90"), 2 )
     ? aDateInfo[1]   //  199002
     ? aDateInfo[2]   //  04/01/90   beginning of quarter 2
     ? aDateInfo[3]   //  06/30/90   end of quarter 2

     // get info about quarter 2 in current year (1991)
     aDateInfo := FT_QTR( , 2 )
     ? aDateInfo[1]   //  199102
     ? aDateInfo[2]   //  04/01/91   beginning of quarter 2
     ? aDateInfo[3]   //  06/30/91   end of quarter 2

 Source: QTR.PRG

 Author: Jo W. French dba Practical Computing

See Also: FT_DATECNFG() FT_WEEK() FT_MONTH() FT_YEAR()



FT_MONTH

FT_MONTH()
 Return Calendar or Fiscal Month Data

 Syntax

      FT_MONTH( [ <dGivenDate> ], [nMonthNum] ) -> aDateInfo

 Arguments

     <dGivenDate> is any valid date in any date format.  Defaults
     to current system date if not supplied.

     <nMonthNum> is a number from 1 to 12 signifying a month.
     Defaults to current month if not supplied.

 Returns

     A three element array containing the following data:

        aDateInfo[1] - The year and month as a character string "YYYYMM"
        aDateInfo[2] - The beginning date of the month
        aDateInfo[3] - The ending date of the month

 Description

     FT_MONTH() returns an array containing data about the month
     containing the given date.

     Normally the return data will be based on a year beginning
     on January 1st with weeks beginning on Sunday.

     The beginning of year date and/or beginning of week day can be
     changed by using FT_DATECNFG(), which will affect all subsequent
     calls to FT_MONTH() until another call to FT_DATECNFG().

     The beginning of year date and beginning of week day may be reset
     to January 1 and Sunday by calling FT_DATECNFG() with no
     parameters.

 Examples

     // get info about month containing 9/15/90
     aDateInfo := FT_MONTH( CTOD("09/15/90") )
     ? aDateInfo[1]   //  199009       (9th month)
     ? aDateInfo[2]   //  09/01/90     beginning of month 9
     ? aDateInfo[3]   //  09/30/90     end of week month 9

     // get info about month 5 in year containing 9/15/90
     aDateInfo := FT_MONTH( CTOD("09/15/90"), 5 )
     ? aDateInfo[1]   //  199005
     ? aDateInfo[2]   //  05/01/90   beginning of month 5
     ? aDateInfo[3]   //  05/31/90   end of month 5

     // get info about month 5 in current year (1991)
     aDateInfo := FT_MONTH( , 5 )
     ? aDateInfo[1]   //  199105
     ? aDateInfo[2]   //  05/01/91   beginning of month 5
     ? aDateInfo[3]   //  05/31/91   end of month 5

 Source: MONTH.PRG

 Author: Jo W. French dba Practical Computing

See Also: FT_DATECNFG() FT_WEEK() FT_QTR() FT_YEAR()