/*
 * $Id: dates2.txt 2931 2000-05-29 23:55:49Z lculik $
 */

/*
 * The following parts are Copyright of the individual authors.
 * www - http://www.harbour-project.org
 *
 * Copyright 2000 Jose Lalin <dezac@corevia.com>
 *    Documentation for: AMONTHS, ADAYS, ISLEAPYEAR, DAYSINMONTH, EOM, BOM,
 *                       WOM, DOY, WOY, EOY, BOY
 *
 * See doc/license.txt for licensing terms.
 *
 */

/*  $DOC$
 *  $FUNCNAME$
 *      AMONTHS()
 *  $CATEGORY$
 *      Date
 *  $ONELINER$
 *      Returns an array with the months names.
 *  $SYNTAX$
 *      AMONTHS()  --> aMonths
 *  $ARGUMENTS$
 *      None
 *  $RETURNS$
 *      <aMonths> The array which holds the months names.
 *  $DESCRIPTION$
 *      This function returns an array with all the months names in the
 *      selected current language.
 *  $EXAMPLES$
 *      aMonths := AMonths()
 *      ? aMonths[1] -> January
 *      ? aMonths[1] -> Enero (if the selected language is Spanish)
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *      This function is new in Harbour.
 *  $PLATFORMS$
 *      All
 *  $FILES$
 *      Library is libmisc
 *  $SEEALSO$
 *      ADAYS()
 *  $END$
 */

/*  $DOC$
 *  $FUNCNAME$
 *      ADAYS()
 *  $CATEGORY$
 *      Date
 *  $ONELINER$
 *      Returns an array with the days names.
 *  $SYNTAX$
 *      ADAYS()  --> aDays
 *  $ARGUMENTS$
 *      None
 *  $RETURNS$
 *      <aDays>   The array which holds the days names.
 *  $DESCRIPTION$
 *      This function returns an array with all the days names in the
 *      selected current language.
 *  $EXAMPLES$
 *      aDays := ADays()
 *      ? aDays[1] -> Sunday
 *      ? aDays[1] -> Domingo (if the selected language is Spanish)
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *      This function is new in Harbour.
 *  $PLATFORMS$
 *      All
 *  $FILES$
 *      Library is libmisc
 *  $SEEALSO$
 *      ADAYS()
 *  $END$
 */

/*  $DOC$
 *  $FUNCNAME$
 *      ISLEAPYEAR()
 *  $CATEGORY$
 *      Date
 *  $ONELINER$
 *      Checks if the given date is a leap year.
 *  $SYNTAX$
 *      ISLEAPYEAR( <dDate> )  --> lTrueOrFalse
 *  $ARGUMENTS$
 *      <dDate>   A valid date.
 *  $RETURNS$
 *      <lTrueOrFalse>  A logical that indicates if the date year is leap
 *  $DESCRIPTION$
 *      This function returns true if the given date is a leap year and
 *      false if isn't.
 *  $EXAMPLES$
 *      ? IsLeapYear( DToC( "01/01/2000" ) ) -> .t.
 *      ? IsLeapYear( DToC( "01/01/2001" ) ) -> .f.
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *      This function is new in Harbour.
 *  $PLATFORMS$
 *      All
 *  $FILES$
 *      Library is libmisc
 *  $SEEALSO$
 *      DAYSINMONTH()
 *  $END$
 */

/*  $DOC$
 *  $FUNCNAME$
 *      DAYSINMONTH()
 *  $CATEGORY$
 *      Date
 *  $ONELINER$
 *      Gets the days in a month.
 *  $SYNTAX$
 *      DAYSINMONTH( <dDate> )  --> nDays
 *  $ARGUMENTS$
 *      <dDate>   A valid date.
 *  $RETURNS$
 *      <nDays>   The number of days of the month.
 *  $DESCRIPTION$
 *      This function returns the number of days of the given date month.
 *  $EXAMPLES$
 *      ? DaysInMonth( DToC( "01/01/2000" ) ) -> 31
 *      ? DaysInMonth( DToC( "02/01/2000" ) ) -> 29
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *      This function is new in Harbour.
 *  $PLATFORMS$
 *      All
 *  $FILES$
 *      Library is libmisc
 *  $SEEALSO$
 *      IsLeapYear()
 *  $END$
 */

/*  $DOC$
 *  $FUNCNAME$
 *      EOM()
 *  $CATEGORY$
 *      Date
 *  $ONELINER$
 *      Gets the last day in a month.
 *  $SYNTAX$
 *      EOM( <dDate> )  --> dEOM
 *  $ARGUMENTS$
 *      <dDate>   A valid date.
 *  $RETURNS$
 *      <dEOM>    The last day in the month.
 *  $DESCRIPTION$
 *      This function returns the last day of a given month date.
 *  $EXAMPLES$
 *      ? EOM( DToC( "01/01/2000" ) ) -> "01/31/2000"
 *      ? EOM( DToC( "02/01/2000" ) ) -> "01/29/2000"
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *      This function is new in Harbour.
 *  $PLATFORMS$
 *      All
 *  $FILES$
 *      Library is libmisc
 *  $SEEALSO$
 *      BOM(),WOM()
 *  $END$
 */

/*  $DOC$
 *  $FUNCNAME$
 *      BOM()
 *  $CATEGORY$
 *      Date
 *  $ONELINER$
 *      Gets the first day in a month.
 *  $SYNTAX$
 *      BOM( <dDate> )  --> dBOM
 *  $ARGUMENTS$
 *      <dDate>   A valid date.
 *  $RETURNS$
 *      <dBOM>    The first day in the month.
 *  $DESCRIPTION$
 *      This function returns the first day of a given month date.
 *  $EXAMPLES$
 *      ? BOM( DToC( "01/25/2000" ) ) -> "01/01/2000"
 *      ? BOM( DToC( "02/24/2000" ) ) -> "02/01/2000"
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *      This function is new in Harbour.
 *  $PLATFORMS$
 *      All
 *  $FILES$
 *      Library is libmisc
 *  $SEEALSO$
 *      EOM(),WOM()
 *  $END$
 */

/*  $DOC$
 *  $FUNCNAME$
 *      DOY()
 *  $CATEGORY$
 *      Date
 *  $ONELINER$
 *      Gets the day number of the year.
 *  $SYNTAX$
 *      DOY( <dDate> )  --> nDay
 *  $ARGUMENTS$
 *      <dDate>   A valid date.
 *  $RETURNS$
 *      <nDay>    The day number
 *  $DESCRIPTION$
 *      This function returns the day number of the year for a given date.
 *  $EXAMPLES$
 *      ? DOY( DToC( "01/31/2000" ) ) -> 31
 *      ? DOY( DToC( "02/20/2000" ) ) -> 51
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *      This function is new in Harbour.
 *  $PLATFORMS$
 *      All
 *  $FILES$
 *      Library is libmisc
 *  $SEEALSO$
 *      WOY()
 *  $END$
 */

/*  $DOC$
 *  $FUNCNAME$
 *      WOY()
 *  $CATEGORY$
 *      Date
 *  $ONELINER$
 *      Gets the week number of the year.
 *  $SYNTAX$
 *      WOY( <dDate>, <lIso> )  --> nWeek
 *  $ARGUMENTS$
 *      <dDate>   A valid date.
 *  $RETURNS$
 *      <nWeek>   The week number
 *      <lIso>    Flag that indicates if <nWeek> is in ISO format.
 *  $DESCRIPTION$
 *      This function returns the week number of the year for a given date.
 *      It returns the week number in ISO format ( range 0 - 52, by default
 *      or passing TRUE as second parameter) or 1 - 52 if lIso is FALSE.
 *  $EXAMPLES$
 *      ? WOY( DToC( "01/31/2000" ) ) -> 3
 *      ? WOY( DToC( "01/31/2000" ), FALSE ) -> 4
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *      This function is new in Harbour.
 *  $PLATFORMS$
 *      All
 *  $FILES$
 *      Library is libmisc
 *  $SEEALSO$
 *      DOY()
 *  $END$
 */

/*  $DOC$
 *  $FUNCNAME$
 *      EOY()
 *  $CATEGORY$
 *      Date
 *  $ONELINER$
 *      Gets the last date of the year.
 *  $SYNTAX$
 *      EOY( <dDate> )  --> dEOY
 *  $ARGUMENTS$
 *      <dDate>   A valid date.
 *  $RETURNS$
 *      <dEOY>    The last date of the year.
 *  $DESCRIPTION$
 *      This function returns the last date of a given year date.
 *  $EXAMPLES$
 *      ? EOY( DToC( "01/01/2000" ) ) -> "31/12/2000"
 *      ? EOY( DToC( "01/01/2001" ) ) -> "31/12/2001"
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *      This function is new in Harbour.
 *  $PLATFORMS$
 *      All
 *  $FILES$
 *      Library is libmisc
 *  $SEEALSO$
 *      BOY()
 *  $END$
 */

/*  $DOC$
 *  $FUNCNAME$
 *      BOY()
 *  $CATEGORY$
 *      Date
 *  $ONELINER$
 *      Gets the first date of the year.
 *  $SYNTAX$
 *      BOY( <dDate> )  --> dBOY
 *  $ARGUMENTS$
 *      <dDate>   A valid date.
 *  $RETURNS$
 *      <dBOY>    The first day in the year.
 *  $DESCRIPTION$
 *      This function returns the first date of a given year date.
 *  $EXAMPLES$
 *      ? BOY( DToC( "01/25/2000" ) ) -> "01/01/2000"
 *      ? BOY( DToC( "02/24/2001" ) ) -> "01/01/2001"
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *      This function is new in Harbour.
 *  $PLATFORMS$
 *      All
 *  $FILES$
 *      Library is libmisc
 *  $SEEALSO$
 *      EOY()
 *  $END$
 */
