[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
FT_DAYOFYR()
Return calendar, fiscal or accounting day data
------------------------------------------------------------------------------
Syntax
FT_DAYOFYR( [ <dGivenDate> ], [ <nDayNum> ], [ <lIsAcct> ] )
-> aDateInfo
Arguments
<dGivenDate> is any valid date in any valid format. Defaults
to current system date if not supplied.
<nDayNum> is a number from 1 to 371, signifying a day of a year.
Defaults to current day if not supplied.
<lIsAcct> is a logical which specifies the type of year to base
the return value on: .F. = calendar or fiscal year,
.T. = accounting year.
Returns
A three element array containing the following data:
If <nDayNum> is specified:
aDateInfo[1] - The date of the specified day number
aDateInfo[2] - The beginning date of the year
aDateInfo[3] - The ending date of the year
If <nDayNum> is not specified:
aDateInfo[1] - The year and day as a character string "YYYYDDD"
aDateInfo[2] - The beginning date of the year
aDateInfo[3] - The ending date of the year
Description
FT_DAYOFYR() returns an array containing data about a day in the
calendar or fiscal year containing the given date.
The beginning of year date defaults to January 1st but may be
changed with FT_DATECNFG().
Examples
aDateInfo := FT_DAYOFYR( CTOD("03/31/91") )
? aDateInfo[1] // 1991090 (90th day of year 1991)
? aDateInfo[2] // 01/01/91
? aDateInfo[3] // 12/31/91
aDateInfo := FT_DAYOFYR( , 90 ) // assume current date is 3/31/91
? aDateInfo[1] // 03/31/91 (90th day of year)
? aDateInfo[2] // 01/01/91
? aDateInfo[3] // 12/31/91
aDateInfo := FT_DAYOFYR( , 90, .T. )
? aDateInfo[1] // 03/29/91 (90th day of accounting year)
? aDateInfo[2] // 12/30/90 (1st day of accounting year)
? aDateInfo[3] // 12/28/91 (last day of accounting year)
Source: DAYOFYR.PRG
Author: Jo W. French dba Practical Computing
See Also:
FT_DATECNFG()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson