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
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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$
|
||||
|
||||
@@ -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$
|
||||
|
||||
@@ -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$
|
||||
|
||||
@@ -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$
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
$ONELINER$
|
||||
Display date/time calendar, find a date, return calendar data.
|
||||
$SYNTAX$
|
||||
FT_CALENDAR ( [ <nRow> ], [ <nCol> ], [ <cColor> ], [ <lShadow> ] ,
|
||||
[ <lShowHelp> ] ) -> aRetVal
|
||||
ft_Calendar( [ <nRow> ], [ <nCol> ], [ <cColor> ], [ <lShadow> ] ,
|
||||
[ <lShowHelp> ] ) -> aRetVal
|
||||
$ARGUMENTS$
|
||||
<nRow> is an optional screen row for calendar display,
|
||||
default row 1.
|
||||
@@ -27,7 +27,7 @@
|
||||
to the display, default (.F.).
|
||||
|
||||
<lShowHelp> 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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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$
|
||||
|
||||
@@ -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$
|
||||
|
||||
@@ -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$
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
$ONELINER$
|
||||
Display same-line pending messages after a wait.
|
||||
$SYNTAX$
|
||||
FT_PENDING ( <cMsg>, [ <nRow> ], [ <nCol> ], ;
|
||||
[ <nWait> ], [ <cColor> ] ) -> NIL
|
||||
ft_Pending( <cMsg>, [ <nRow> ], [ <nCol> ], ;
|
||||
[ <nWait> ], [ <cColor> ] ) -> NIL
|
||||
$ARGUMENTS$
|
||||
<cMsg> is the message string to display.
|
||||
|
||||
|
||||
@@ -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$
|
||||
|
||||
@@ -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$
|
||||
|
||||
@@ -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$
|
||||
|
||||
@@ -15,6 +15,8 @@ PROCEDURE Main()
|
||||
MSetCursor( .T. )
|
||||
#endif
|
||||
|
||||
Set( _SET_DATEFORMAT, "yyyy-mm-dd" )
|
||||
|
||||
CLS
|
||||
|
||||
USE test
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -27,6 +27,8 @@ PROCEDURE Main()
|
||||
MSetCursor( .T. )
|
||||
#endif
|
||||
|
||||
Set( _SET_DATEFORMAT, "yyyy-mm-dd" )
|
||||
|
||||
CLS
|
||||
|
||||
USE test
|
||||
|
||||
Reference in New Issue
Block a user