/* $DOC$
   $NAME$
      ft_DayOfYr()
   $CATEGORY$
      Date/Time
   $ONELINER$
      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( hb_SToD( "19910331" ) )
      ? aDateInfo[ 1 ]        // 1991090    (90th day of year 1991)
      ? aDateInfo[ 2 ]        // 1991-01-01
      ? aDateInfo[ 3 ]        // 1991-12-31

      aDateInfo := ft_DayOfYr( , 90 )    // assume current date is 3/31/91
      ? aDateInfo[ 1 ]        // 1991-03-31    (90th day of year)
      ? aDateInfo[ 2 ]        // 1991-01-01
      ? aDateInfo[ 3 ]        // 1991-12-31

      aDateInfo := ft_DayOfYr( , 90, .T. )
      ? aDateInfo[ 1 ]        // 1991-03-29    (90th day of accounting year)
      ? aDateInfo[ 2 ]        // 1990-12-30    (1st day of accounting year)
      ? aDateInfo[ 3 ]        // 1991-12-28    (last day of accounting year)
   $SEEALSO$
      ft_DateCnfg()
   $END$
 */
