CT_DMY

 DMY()
 Returns a date in "DD Month YY" format
------------------------------------------------------------------------------
 Syntax

     DMY([<dDate>], [<lMode>]) --> cDate

 Arguments

     <dDate>  Designates the date from which to create a string.  The
     default is the system date.

     <lMode>  Designates whether to insert a period (.) after the day
     (see Examples).  The default is no period (.F.).

 Returns

     DMY() returns a character string in "DD[.] Month YY" format or "DD[.]
     Month YYYY" format.

 Description

     Use DMY() to return the date as a character string using the day, name
     of month, and year.  The CA-Clipper SET CENTURY ON/OFF switch determines
     whether or not the year is displayed in two or four digits.  If the
     <lMode> parameter is designated .T., the function builds in a "." after
     the day designation. If no date is designated as a parameter, the
     function automatically uses the current system date.

 Note

     .  The month name returned depends on which CA-Clipper nations
        module is in use.

 Examples

     .  Display the system date (1/1/89):

        SET CENTURY OFF
        ? DMY()                            // 1 January 89

     .  With ".":

        ? DMY(.T.)                         // 1. January 89

     .  Display a different date:

        SET CENTURY ON
        ? DMY(CTOD("02/01/89"), .T.)       // 1. February 1989

See Also: MDY()

CT_CToMonth()

 CTOMONTH()
 Converts the name of the month into a corresponding number
------------------------------------------------------------------------------
 Syntax

     CTOMONTH(<cMonth>) --> nMonth

 Argument

     <cMonth>  Designates the name of one of the 12 months.

 Returns

     CTOMONTH() returns the number for the designated month name.

 Description

     Use CTOMONTH() to change the name of a month into a number.  January
     corresponds to 1, February 2, etc..  If the function returns a 0 value,
     then an invalid parameter has been passed.  If you shorten the month
     name, use explicit abbreviations to return an accurate return value.

 Notes

     .  Uppercase and lowercase letters do not affect the name of the
        month.

     .  The function's operation depends on the country-specific
        adaptation of your CA-Clipper compiler.  With an English version of
        CA-Clipper, only English month names are recognized.

 Examples

     .  Show the number for January:

        ? CTOMONTH("January")      // Result: 1

     .  Show several ways to determine the month number for August:

        ? CTOMONTH("AUGUST")       // Result: 8
        ? CTOMONTH("August")       // Result: 8
        ? CTOMONTH("Au")           // Result: 8

     .  The number for April:

        ?CTOMONTH("A")             // Result: 4

CT_AddMonth()

ADDMONTH()
 Adds or subtracts months to/from a date
------------------------------------------------------------------------------
 Syntax

     ADDMONTH([<dDate>], [<nMonth>]) --> dNewDate

 Arguments

     <dDate>  Designates the date to which the <nMonth> months is added.
     The default is the system date.

     <nMonth>  Designates the number of months to add to <dDate>.

 Returns

     ADDMONTH() returns the new date after <nMonth> is added to <dDate>.

 Description

     Use this function to calculate payment due dates based on an invoice
     date and for similar applications.  It permits you to add months to a
     given date.  If you use a negative number, months are subtracted.

 Note

     .  An empty date parameter will result in an empty date.

 Examples

     * Show today's date, plus 36 months:

     ? "The payment period ends on: ", ADDMONTH(36)

     * Today plus 7 month: 
     ? "AddMonth( 7 ) :", AddMonth( 7 )

     * Date of last day of 7 month after :
     ? "EOM( AddMonth( 7 ) ) :", EOM( AddMonth( 7 ) )

     * Dates of next year: 
     dDate := CTOD( "12.12.2012" )
     ? "Last day of one month after", dDate, ":", EOM( AddMonth( dDate, 1 ) )
     ? "Last day of two month after", dDate, ":", EOM( AddMonth( dDate, 2 ) )
     
     * Month before 
     ? "Date of two month before", dDate, ":", AddMonth( dDate, -2 )
     ?

CT_CToDoW()

  NAME :
     CToDoW()
  CATEGORY :
     CT3 date and time functions
  ONELINER :
     Convert name of day of the week to its ordinal number
  SYNTAX :
     CToDoW( <cDayName> ) -> <nOrdinal>
  ARGUMENT :
     <cDayName> : Name of day to convert to ordinal number
  RETURN :
     <nOrdinal> : Ordinal number of <cDayName>
  EXAMPLE :
 PROC MAIN()
    SETMODE( 25, 80 )
    CLS
    SET DATE GERM
    SET CENT ON
    ? "CTODOW('Sunday') :", CTODOW('Sunday') // 1
    *  Show several ways to get the day of
    *  the week for Wednesday:
    ? "CTODOW('WEDNESDAY') :", CTODOW('WEDNESDAY')      // 4
    ? "CTODOW('Wednesday') :", CTODOW('Wednesday')      // 4
    ? "CTODOW('Wed') :",CTODOW('Wed')                   //  4
    *  What number of the day of the week is Monday?
    ? "CTODOW( 'M' ) :", CTODOW( 'M' ) //  2
    ?
    WAIT "EOF CTODOW.prg"
 RETURN // MAIN
  COMPLIANCE :
     CToDoW() is compatible with CT3's CToDoW()
  PLATFORMS :
     All
  FILES :
     Library is hbct.
  SEE ALSO :
     NToCDoW()


CT_EoY()

  NAME :
     EoY()
  CATEGORY :
     CT3 date and time functions
  SYNTAX :
     EoY( [<dDate>] ) -> dDateEndOfYear
  ARGUMENT :
     [<dDate>] : Date to find last day of year, default is DATE()
  RETURNS :
     <dDateEndOfYear> : Last date Of Year of given date
  EXAMPLE :
 PROC MAIN()
    SETMODE( 25, 80 )
    CLS
    SET DATE GERM
    SET CENT ON
    ? "Today is :", DATE()
    ? "Last day of this year :", EoY()
    ? "Remaining days in the current year:", EoY() - DATE()
    ?
    WAIT "EOF EoY.prg"
 RETURN // MAIN
  COMPLIANCE :
     EoY() is compatible with CT3's EoY()
  PLATFORMS :
     All
  FILES :
     Library is hbct
  SEE ALSO :
     BoM(),EoM(),BoQ(),EoQ(),BoY()

CT_BoY()

  NAME :
     BoY()
  CATEGORY :
     CT3 date and time functions
  SYNTAX :
     BoY( [<dDate>] ) -> dDateBeginOfYear
  ARGUMENT :
     [<dDate>] : Date to find first day of year, default is DATE()
  RETURNS :
     <dDateBeginOfYear> : Beginning date Of year of given date
  EXAMPLE :
 PROC MAIN()
    SETMODE( 25, 80 )
    CLS
    SET DATE GERM
    SET CENT ON
    ? "Today is :", DATE()
    ? "Date of first day of this year :", BOY()
    ? "Days elapsed in the current year:", DATE() - BOY()
    ?
    WAIT "EOF BoY.prg"
 RETURN // MAIN
  COMPLIANCE :
     BoY() is compatible with CT3's BoY()
  PLATFORMS :
     All
  FILES :
     Library is hbct.
  SEE ALSO :
     BoM(),EoM(),BoQ(),EoQ(),EoY()


CT_EoQ()

  NAME
     EoQ()
  CATEGORY
     CT3 date and time functions
  SYNTAX
     EoQ( [<dDate>] ) -> dDateEndOfQ
  ARGUMENT:
     [<dDate>] : Date to find end of quarter, default is DATE()
  RETURNS:
     <dDateEndOfQuarter> : Date of end of quarter containing given date
  EXAMPLE :
     PROC MAIN()
        SETMODE( 25, 80 )
        CLS
        SET DATE GERM
        SET CENT ON
        ? "Today is :", DATE()
        ? "Last day of this quarter
        ? "Days remaininng in the cu
        ?
        WAIT "EOF EOQ.prg"
     RETURN // MAIN
  COMPLIANCE :
     EoQ() is compatible with CT3's
  PLATFORMS :
     All
  FILES :
     Library is hbct.
  SEE ALSO :
     BoM(),EoM(),BoQ(),BoY(),EoY()

CT_BoQ()

  NAME :
     BoQ()
  CATEGORY :
     CT3 date and time functions
  SYNTAX :
     BoQ( [<dDate>] ) -> <dDateBeginOfQuarter>
  ARGUMENT :
     [<dDate>] : Date to find Begin Of Quarter, default is DATE()
  RETURNS :
     <dDateBeginOfQuarter> : Date of beginning Of quarter containing given date
  EXAMPLE :
     PROC MAIN()
        SETMODE( 25, 80 )
        CLS
        SET DATE GERM
        SET CENT ON
        ? "Today is :", DATE()
        ? "Beginning day of this quarter :", BOQ()
        ? "Days elapsed in the current quarter :", DATE() - BOQ()
        ?
        WAIT "EOF BOQ.prg"
     RETURN // MAIN
  COMPLIANCE :
     BoQ() is compatible with CT3's BoQ()

  PLATFORMS :
     All
  FILES :
     Library is hbct.
  SEE ALSO :
     BoM(), EoM(), EoQ(), BoY(), EoY()

CT_EoM()

NAME :
   EoM()

CATEGORY :
   CT3 date and time functions

ONELINER :
   End Of Month

SYNTAX :
   EoM( [<dDate>] ) -> <dDateEndOfMon

ARGUMENT :
   [<dDate>] : Date to find last day
RETURNS :
   <dDateEndOfMonth> : Last date Of Month

EXAMPLES :
PROC MAIN()
   SETMODE( 25, 80 )
   CLS
   SET DATE GERM
   SET CENT ON
   ? "Today is :", DATE()
   ? "Last day of this month :", EOM()
   ? "Remaining days in the current month:", EOM() - DATE()
   ?
   WAIT "EOF EOM.prg"
    RETURN // MAIN

COMPLIANCE :
   EoM() is compatible with CT3's EoM
PLATFORMS :
   All 

FILES :
   Library is hbct.

SEE ALSO :
BoM(), BoQ(), EoQ(), BoY(), EoY()

CT_BoM()

  NAME
     BoM()
  CATEGORY
     CT3 date and time functions
  SYNTAX :
     BoM( [<dDate>] ) -> <dDateBeginOfMonth>
  ARGUMENT :
     [<dDate>] : Date to find first day of month, default is DATE()
  RETURNS :
    <dDateBeginOfMonth> : Beginning date Of Month of given date
  EXAMPLES
 PROC MAIN()
    SETMODE( 25, 80 )
    CLS
    SET DATE GERM
    SET CENT ON
    ? "Today is :", DATE()
    ? "Date of first day of this month :", BOM()
    ? "Days elapsed in the current month:", DATE() - BOM()
    ?
    WAIT "EOF BOM.prg"
 RETURN // MAIN
  COMPLIANCE   
     BoM() is compatible with CT3's BoM().
  PLATFORMS

     All
  FILES
     Library is hbct.
  SEE ALSO
     EoM(), BoQ(), EoQ(), BoY(), EoY()