From d536c34dfc8ef09122f9c0b7936eea14e6594f37 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 11 Mar 2013 15:27:38 +0000 Subject: [PATCH] 2013-03-11 16:26 UTC+0100 Viktor Szakats (vszakats syenar.net) * contrib/hbnf/doc/en/*.txt * tests/browse.prg * tests/db_brows.prg * tests/extend1.prg * website/samples/browse.prg.html * date cleanups --- harbour/ChangeLog.txt | 8 ++++++++ harbour/contrib/hbnf/doc/en/acctmnth.txt | 8 ++++---- harbour/contrib/hbnf/doc/en/acctqtr.txt | 8 ++++---- harbour/contrib/hbnf/doc/en/acctweek.txt | 8 ++++---- harbour/contrib/hbnf/doc/en/acctyear.txt | 4 ++-- harbour/contrib/hbnf/doc/en/calendar.txt | 14 ++++++-------- harbour/contrib/hbnf/doc/en/datecnfg.txt | 8 ++++++-- harbour/contrib/hbnf/doc/en/dayofyr.txt | 16 ++++++++-------- harbour/contrib/hbnf/doc/en/month.txt | 12 ++++++------ harbour/contrib/hbnf/doc/en/pegs.txt | 2 +- harbour/contrib/hbnf/doc/en/pending.txt | 4 ++-- harbour/contrib/hbnf/doc/en/qtr.txt | 12 ++++++------ harbour/contrib/hbnf/doc/en/week.txt | 12 ++++++------ harbour/contrib/hbnf/doc/en/year.txt | 8 ++++---- harbour/tests/browse.prg | 2 ++ harbour/tests/db_brows.prg | 1 + harbour/tests/extend1.prg | 4 ++-- harbour/website/samples/browse.prg.html | 2 ++ 18 files changed, 74 insertions(+), 59 deletions(-) diff --git a/harbour/ChangeLog.txt b/harbour/ChangeLog.txt index abdd54b915..62985fd5c5 100644 --- a/harbour/ChangeLog.txt +++ b/harbour/ChangeLog.txt @@ -10,6 +10,14 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2013-03-11 16:26 UTC+0100 Viktor Szakats (vszakats syenar.net) + * contrib/hbnf/doc/en/*.txt + * tests/browse.prg + * tests/db_brows.prg + * tests/extend1.prg + * website/samples/browse.prg.html + * date cleanups + 2013-03-11 12:07 UTC+0100 Viktor Szakats (harbour syenar.net) * utils/hbmk2/hbmk2.prg + added help and Markdown output for hbrun mode, diff --git a/harbour/contrib/hbnf/doc/en/acctmnth.txt b/harbour/contrib/hbnf/doc/en/acctmnth.txt index 24b110349a..d88b0ee4dc 100644 --- a/harbour/contrib/hbnf/doc/en/acctmnth.txt +++ b/harbour/contrib/hbnf/doc/en/acctmnth.txt @@ -43,14 +43,14 @@ // get info about accounting month containing 9/15/90 aDateInfo := ft_AcctMonth( hb_SToD( "19900915" ) ) ? aDateInfo[ 1 ] // 199009 (9th month) - ? aDateInfo[ 2 ] // 09/02/90 beginning of month 9 - ? aDateInfo[ 3 ] // 09/29/90 end of month 9 + ? aDateInfo[ 2 ] // 1990-09-02 beginning of month 9 + ? aDateInfo[ 3 ] // 1990-09-29 end of month 9 // get info about accounting month 5 in year containing 9/15/90 aDateInfo := ft_AcctMonth( hb_SToD( "19900915" ), 5 ) ? aDateInfo[ 1 ] // 199005 - ? aDateInfo[ 2 ] // 04/29/89 beginning of month 5 - ? aDateInfo[ 3 ] // 06/02/90 end of month 5 + ? aDateInfo[ 2 ] // 1989-04-29 beginning of month 5 + ? aDateInfo[ 3 ] // 1990-06-02 end of month 5 $SEEALSO$ ft_DateCnfg() ft_AcctWeek() ft_AcctQtr() ft_AcctYear() $END$ diff --git a/harbour/contrib/hbnf/doc/en/acctqtr.txt b/harbour/contrib/hbnf/doc/en/acctqtr.txt index 44e7901b16..7c06f9f84b 100644 --- a/harbour/contrib/hbnf/doc/en/acctqtr.txt +++ b/harbour/contrib/hbnf/doc/en/acctqtr.txt @@ -43,14 +43,14 @@ // get info about accounting month containing 9/15/90 aDateInfo := ft_AcctQtr( hb_SToD( "19900915" ) ) ? aDateInfo[ 1 ] // 199003 (3rd quarter) - ? aDateInfo[ 2 ] // 07/01/90 beginning of quarter 3 - ? aDateInfo[ 3 ] // 09/29/90 end of quarter 3 + ? aDateInfo[ 2 ] // 1990-07-01 beginning of quarter 3 + ? aDateInfo[ 3 ] // 1990-09-29 end of quarter 3 // get info about accounting qtr. 2 in year containing 9/15/90 aDateInfo := ft_AcctQtr( hb_SToD( "19900915" ), 2 ) ? aDateInfo[ 1 ] // 199002 - ? aDateInfo[ 2 ] // 04/01/89 beginning of quarter 2 - ? aDateInfo[ 3 ] // 06/30/90 end of quarter 2 + ? aDateInfo[ 2 ] // 1989-04-01 beginning of quarter 2 + ? aDateInfo[ 3 ] // 1990-06-30 end of quarter 2 $SEEALSO$ ft_DateCnfg() ft_AcctWeek() ft_AcctMonth() ft_AcctYear() $END$ diff --git a/harbour/contrib/hbnf/doc/en/acctweek.txt b/harbour/contrib/hbnf/doc/en/acctweek.txt index 8df5d17408..89103a2704 100644 --- a/harbour/contrib/hbnf/doc/en/acctweek.txt +++ b/harbour/contrib/hbnf/doc/en/acctweek.txt @@ -43,14 +43,14 @@ // get info about accounting week containing 9/15/90 aDateInfo := ft_AcctWeek( hb_SToD( "19900915" ) ) ? aDateInfo[ 1 ] // 199037 (37th week) - ? aDateInfo[ 2 ] // 09/09/90 beginning of week 37 - ? aDateInfo[ 3 ] // 09/15/90 end of week 37 + ? aDateInfo[ 2 ] // 1990-09-09 beginning of week 37 + ? aDateInfo[ 3 ] // 1990-09-15 end of week 37 // get info about accounting week 25 in year containing 9/15/90 aDateInfo := ft_AcctWeek( hb_SToD( "19900915" ), 25 ) ? aDateInfo[ 1 ] // 199025 - ? aDateInfo[ 2 ] // 06/17/89 beginning of week 25 - ? aDateInfo[ 3 ] // 06/23/90 end of week 25 + ? aDateInfo[ 2 ] // 1989-06-17 beginning of week 25 + ? aDateInfo[ 3 ] // 1990-06-23 end of week 25 $SEEALSO$ ft_DateCnfg() ft_AcctMonth() ft_AcctQtr() ft_AcctYear() $END$ diff --git a/harbour/contrib/hbnf/doc/en/acctyear.txt b/harbour/contrib/hbnf/doc/en/acctyear.txt index 73761d538a..b3395c261e 100644 --- a/harbour/contrib/hbnf/doc/en/acctyear.txt +++ b/harbour/contrib/hbnf/doc/en/acctyear.txt @@ -40,8 +40,8 @@ // get info about accounting year containing 9/15/90 aDateInfo := ft_AcctYear( hb_SToD( "19900915" ) ) ? aDateInfo[ 1 ] // 1990 - ? aDateInfo[ 2 ] // 12/31/89 beginning of year - ? aDateInfo[ 3 ] // 12/29/90 end of year + ? aDateInfo[ 2 ] // 1989-12-31 beginning of year + ? aDateInfo[ 3 ] // 1990-12-29 end of year $SEEALSO$ ft_DateCnfg() ft_AcctWeek() ft_AcctMonth() ft_AcctQtr() $END$ diff --git a/harbour/contrib/hbnf/doc/en/calendar.txt b/harbour/contrib/hbnf/doc/en/calendar.txt index e8e7a4f1c5..52e21ac630 100644 --- a/harbour/contrib/hbnf/doc/en/calendar.txt +++ b/harbour/contrib/hbnf/doc/en/calendar.txt @@ -10,8 +10,8 @@ $ONELINER$ Display date/time calendar, find a date, return calendar data. $SYNTAX$ - FT_CALENDAR ( [ ], [ ], [ ], [ ] , - [ ] ) -> aRetVal + ft_Calendar( [ ], [ ], [ ], [ ] , + [ ] ) -> aRetVal $ARGUMENTS$ is an optional screen row for calendar display, default row 1. @@ -27,7 +27,7 @@ to the display, default (.F.). is an optional logical variable. If true, uses - FT_XBOX to display a four line help message + FT_XBOX() to display a four line help message if the F1 key is pressed, default (.F.). $RETURNS$ @@ -51,14 +51,12 @@ [7] Numeric Julian day. [8] Current time in time format. - WARNING: FT_CALENDAR uses FT_SHADOW and FT_XBOX + WARNING: FT_CALENDAR() uses FT_SHADOW() and FT_XBOX() from the Nanforum Toolkit! $EXAMPLES$ - LOCAL aRetVal[ 8 ] - CLS - aRetVal := ft_Calendar( 10, 40, "W+/RB", .T., .T. ) - ? aRetVal[ 1 ] // Result: 04/20/91 + LOCAL aRetVal := ft_Calendar( 10, 40, "W+/RB", .T., .T. ) + ? aRetVal[ 1 ] // Result: 1991-04-20 ? aRetVal[ 2 ] // Result: 4 ? aRetVal[ 3 ] // Result: 20 ? aRetVal[ 4 ] // Result: 1991 diff --git a/harbour/contrib/hbnf/doc/en/datecnfg.txt b/harbour/contrib/hbnf/doc/en/datecnfg.txt index e8cc8384df..87dfb1faab 100644 --- a/harbour/contrib/hbnf/doc/en/datecnfg.txt +++ b/harbour/contrib/hbnf/doc/en/datecnfg.txt @@ -58,12 +58,15 @@ // Configure library date functions to begin year on // July 1st. - ft_DateCnfg( "07/01/80" ) // year is insignificant + Set( _SET_DATEFORMAT, "yyyy-mm-dd" ) + ft_DateCnfg( "1980-07-01" ) // year is insignificant // Examples of return values: - // System date format: American aArray[1] aArray[2] + // aArray[1] aArray[2] + // System date format: American + SET DATE TO AMERICAN aArray := ft_DateCnfg() // "1980.01.01" 1 (Sun.) aArray := ft_DateCnfg( "07/01/80" ) // "1980.07.01" 1 (Sun.) aArray := ft_DateCnfg( "07/01/80", 2 ) // "1980.07.01" 2 (Mon.) @@ -71,6 +74,7 @@ // System date format: British + SET DATE TO BRITISH aArray := ft_DateCnfg( "01/07/80", 2 ) // "1980.07.01" 2 (Mon.) $SEEALSO$ ft_AcctAdj() diff --git a/harbour/contrib/hbnf/doc/en/dayofyr.txt b/harbour/contrib/hbnf/doc/en/dayofyr.txt index 7b5f5ae41f..83edd019da 100644 --- a/harbour/contrib/hbnf/doc/en/dayofyr.txt +++ b/harbour/contrib/hbnf/doc/en/dayofyr.txt @@ -45,18 +45,18 @@ $EXAMPLES$ aDateInfo := ft_DayOfYr( hb_SToD( "19910331" ) ) ? aDateInfo[ 1 ] // 1991090 (90th day of year 1991) - ? aDateInfo[ 2 ] // 01/01/91 - ? aDateInfo[ 3 ] // 12/31/91 + ? aDateInfo[ 2 ] // 1991-01-01 + ? aDateInfo[ 3 ] // 1991-12-31 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[ 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 ] // 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) + ? 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$ diff --git a/harbour/contrib/hbnf/doc/en/month.txt b/harbour/contrib/hbnf/doc/en/month.txt index bb4b40746f..85029bab29 100644 --- a/harbour/contrib/hbnf/doc/en/month.txt +++ b/harbour/contrib/hbnf/doc/en/month.txt @@ -41,20 +41,20 @@ // get info about month containing 9/15/90 aDateInfo := ft_Month( hb_SToD( "19900915" ) ) ? aDateInfo[ 1 ] // 199009 (9th month) - ? aDateInfo[ 2 ] // 09/01/90 beginning of month 9 - ? aDateInfo[ 3 ] // 09/30/90 end of week month 9 + ? aDateInfo[ 2 ] // 1990-09-01 beginning of month 9 + ? aDateInfo[ 3 ] // 1990-09-30 end of week month 9 // get info about month 5 in year containing 9/15/90 aDateInfo := ft_Month( hb_SToD( "19900915" ), 5 ) ? aDateInfo[ 1 ] // 199005 - ? aDateInfo[ 2 ] // 05/01/90 beginning of month 5 - ? aDateInfo[ 3 ] // 05/31/90 end of month 5 + ? aDateInfo[ 2 ] // 1990-05-01 beginning of month 5 + ? aDateInfo[ 3 ] // 1990-05-31 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 + ? aDateInfo[ 2 ] // 1991-05-01 beginning of month 5 + ? aDateInfo[ 3 ] // 1991-05-31 end of month 5 $SEEALSO$ ft_DateCnfg() ft_Week() ft_Qtr() ft_Year() $END$ diff --git a/harbour/contrib/hbnf/doc/en/pegs.txt b/harbour/contrib/hbnf/doc/en/pegs.txt index e4d97c7bd6..56ac7240fb 100644 --- a/harbour/contrib/hbnf/doc/en/pegs.txt +++ b/harbour/contrib/hbnf/doc/en/pegs.txt @@ -8,7 +8,7 @@ $CATEGORY$ Game $ONELINER$ - FT_PEGS GAME (all work and no play...) + PEGS GAME (all work and no play...) $SYNTAX$ ft_Pegs() -> NIL $ARGUMENTS$ diff --git a/harbour/contrib/hbnf/doc/en/pending.txt b/harbour/contrib/hbnf/doc/en/pending.txt index a27908d79e..569f564cfe 100644 --- a/harbour/contrib/hbnf/doc/en/pending.txt +++ b/harbour/contrib/hbnf/doc/en/pending.txt @@ -10,8 +10,8 @@ $ONELINER$ Display same-line pending messages after a wait. $SYNTAX$ - FT_PENDING ( , [ ], [ ], ; - [ ], [ ] ) -> NIL + ft_Pending( , [ ], [ ], ; + [ ], [ ] ) -> NIL $ARGUMENTS$ is the message string to display. diff --git a/harbour/contrib/hbnf/doc/en/qtr.txt b/harbour/contrib/hbnf/doc/en/qtr.txt index 20b289c938..dac7f1f717 100644 --- a/harbour/contrib/hbnf/doc/en/qtr.txt +++ b/harbour/contrib/hbnf/doc/en/qtr.txt @@ -41,20 +41,20 @@ // get info about quarter containing 9/15/90 aDateInfo := ft_Qtr( hb_SToD( "19900915" ) ) ? aDateInfo[ 1 ] // 199003 (3rd quarter) - ? aDateInfo[ 2 ] // 07/01/90 beginning of quarter 3 - ? aDateInfo[ 3 ] // 09/30/90 end of week quarter 3 + ? aDateInfo[ 2 ] // 1990-07-01 beginning of quarter 3 + ? aDateInfo[ 3 ] // 1990-09-30 end of week quarter 3 // get info about quarter 2 in year containing 9/15/90 aDateInfo := ft_Qtr( hb_SToD( "19900915" ), 2 ) ? aDateInfo[ 1 ] // 199002 - ? aDateInfo[ 2 ] // 04/01/90 beginning of quarter 2 - ? aDateInfo[ 3 ] // 06/30/90 end of quarter 2 + ? aDateInfo[ 2 ] // 1990-04-01 beginning of quarter 2 + ? aDateInfo[ 3 ] // 1990-06-30 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 + ? aDateInfo[ 2 ] // 1991-04-01 beginning of quarter 2 + ? aDateInfo[ 3 ] // 1991-06-30 end of quarter 2 $SEEALSO$ ft_DateCnfg() ft_Week() ft_Month() ft_Year() $END$ diff --git a/harbour/contrib/hbnf/doc/en/week.txt b/harbour/contrib/hbnf/doc/en/week.txt index 2ef58f957e..91272fc4bb 100644 --- a/harbour/contrib/hbnf/doc/en/week.txt +++ b/harbour/contrib/hbnf/doc/en/week.txt @@ -41,20 +41,20 @@ // get info about week containing 9/15/90 aDateInfo := ft_Week( hb_SToD( "19900915" ) ) ? aDateInfo[ 1 ] // 199037 (37th week) - ? aDateInfo[ 2 ] // 09/09/90 beginning of week 37 - ? aDateInfo[ 3 ] // 09/15/90 end of week 37 + ? aDateInfo[ 2 ] // 1990-09-09 beginning of week 37 + ? aDateInfo[ 3 ] // 1990-09-15 end of week 37 // get info about week 25 in year containing 9/15/90 aDateInfo := ft_Week( hb_SToD( "19900915" ), 25 ) ? aDateInfo[ 1 ] // 199025 - ? aDateInfo[ 2 ] // 06/17/90 beginning of week 25 - ? aDateInfo[ 3 ] // 06/23/90 end of week 25 + ? aDateInfo[ 2 ] // 1990-06-17 beginning of week 25 + ? aDateInfo[ 3 ] // 1990-06-23 end of week 25 // get info about week 25 in current Year( 1991 ) aDateInfo := ft_Week( , 25 ) ? aDateInfo[ 1 ] // 199025 - ? aDateInfo[ 2 ] // 06/16/91 beginning of week 25 - ? aDateInfo[ 3 ] // 06/22/91 end of week 25 + ? aDateInfo[ 2 ] // 1991-06-16 beginning of week 25 + ? aDateInfo[ 3 ] // 1991-06-22 end of week 25 $SEEALSO$ ft_DateCnfg() ft_Month() ft_Qtr() ft_Year() ft_DayToBoW() $END$ diff --git a/harbour/contrib/hbnf/doc/en/year.txt b/harbour/contrib/hbnf/doc/en/year.txt index c6c1e772ae..2bb1734dca 100644 --- a/harbour/contrib/hbnf/doc/en/year.txt +++ b/harbour/contrib/hbnf/doc/en/year.txt @@ -38,14 +38,14 @@ // beginning of year is January 1st. aDateInfo := ft_Year( hb_SToD( "19900915" ) ) ? aDateInfo[ 1 ] // 1990 - ? aDateInfo[ 2 ] // 01/01/90 beginning of year - ? aDateInfo[ 3 ] // 12/31/90 end of year + ? aDateInfo[ 2 ] // 1990-01-01 beginning of year + ? aDateInfo[ 3 ] // 1990-12-31 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 + ? aDateInfo[ 2 ] // 1991-01-01 beginning of year + ? aDateInfo[ 3 ] // 1991-12-31 end of year $SEEALSO$ ft_DateCnfg() ft_Week() ft_Month() ft_Qtr() $END$ diff --git a/harbour/tests/browse.prg b/harbour/tests/browse.prg index fba29f4e54..3e53eb8bbf 100644 --- a/harbour/tests/browse.prg +++ b/harbour/tests/browse.prg @@ -15,6 +15,8 @@ PROCEDURE Main() MSetCursor( .T. ) #endif + Set( _SET_DATEFORMAT, "yyyy-mm-dd" ) + CLS USE test diff --git a/harbour/tests/db_brows.prg b/harbour/tests/db_brows.prg index 4b554cf0ab..87475a6221 100644 --- a/harbour/tests/db_brows.prg +++ b/harbour/tests/db_brows.prg @@ -92,6 +92,7 @@ PROCEDURE Main( filename ) ? "", "db_brows filename" QUIT ENDIF + Set( _SET_DATEFORMAT, "yyyy-mm-dd" ) USE ( filename ) DO WHILE vybkey != 0 vybkey := DBFLIST( , 3, 1, 76, 20, filename ) diff --git a/harbour/tests/extend1.prg b/harbour/tests/extend1.prg index 2964c06e3e..4420ffe63f 100644 --- a/harbour/tests/extend1.prg +++ b/harbour/tests/extend1.prg @@ -262,7 +262,7 @@ PROCEDURE Main() ? ? ' _parc( -1, ...) with Undoc2() =>', Undoc2() ? ' _parclen( -1, ...) with Undoc3() =>', Undoc3() - ? ' _pards( -1, ...) with Undoc4( CToD( "01/01/2000" ) ) =>', Undoc4( CToD( "01/01/2000" ) ) + ? ' _pards( -1, ...) with Undoc4( CToD( "2000-01-01" ) ) =>', Undoc4( CToD( "2000-01-01" ) ) ? ' _parl( -1, ...) with Undoc5( .T. ) =>', Undoc5( .T. ) ? ' _parnd( -1, ...) with Undoc6( 1234567.89 ) =>', Undoc6( 1234567.89 ) ? ' _parni( -1, ...) with Undoc7( 1234 ) =>', Undoc7( 1234 ) @@ -271,7 +271,7 @@ PROCEDURE Main() ? ' _parinfo( -1 ) with Undoc10() =>', Undoc10(), "( IT_STRING )" ? ' _storc( szText, -1, ... ) with Undoc11( "Hello word" ) =>', Undoc11( "Hello word" ) ? ' _storclen( szText, -1, ... ) with Undoc12( "Hello word", 7 ) =>', Undoc12( "Hello word", 7 ) - ? ' _stords( szDate, -1, ... ) with Undoc13( CToD( "01/01/2000" ) ) =>', Undoc13( CToD( "01/01/2000" ) ) + ? ' _stords( szDate, -1, ... ) with Undoc13( CToD( "2000-01-01" ) ) =>', Undoc13( CToD( "2000-01-01" ) ) ? ' _storl( iLogical, -1 ) with Undoc14( .T. ) =>', Undoc14( .T. ) ? ' _storni( iValue, -1 ) with Undoc15( 1234 ) =>', Undoc15( 1234 ) ? ' _stornl( lValue, -1 ) with Undoc16( 123456789 ) =>', Undoc16( 123456789 ) diff --git a/harbour/website/samples/browse.prg.html b/harbour/website/samples/browse.prg.html index 268f79675a..097e9e1023 100644 --- a/harbour/website/samples/browse.prg.html +++ b/harbour/website/samples/browse.prg.html @@ -27,6 +27,8 @@ PROCEDURE Main() MSetCursor( .T. ) #endif + Set( _SET_DATEFORMAT, "yyyy-mm-dd" ) + CLS USE test