2010-11-03 29:59 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/harbour.hbx
* src/rtl/dateshb.c
+ Added HB_DATE( [<nYear>, <nMonth>, <nDay>] ) -> <dDate>
If called without options, it returns current date, just like DATE().
* Changed HB_DATETIME() to work like above except for timestamps.
* contrib/hbqt/hbqt_all.hbp
- Deleted wrong MS-DOS fix.
* contrib/hbqt/utils/hbqtgen.prg
% Optimized to not read each input file twice.
* contrib/hbqt/hbqt_hbmk2_plugin.hbs
+ Added #include "hbclass.ch". After 2010-11-03 23:28 UTC+0100
it works as expect. Thanks a lot Przemek!
Header dir is setup correctly now by hbmk2, so hbmk2 plugins
can safely use Harbour headers. (in hbmk2 context the headers
should be present anyway, so this is square)
This commit is contained in:
@@ -16,6 +16,26 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2010-11-03 29:59 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* include/harbour.hbx
|
||||
* src/rtl/dateshb.c
|
||||
+ Added HB_DATE( [<nYear>, <nMonth>, <nDay>] ) -> <dDate>
|
||||
If called without options, it returns current date, just like DATE().
|
||||
* Changed HB_DATETIME() to work like above except for timestamps.
|
||||
|
||||
* contrib/hbqt/hbqt_all.hbp
|
||||
- Deleted wrong MS-DOS fix.
|
||||
|
||||
* contrib/hbqt/utils/hbqtgen.prg
|
||||
% Optimized to not read each input file twice.
|
||||
|
||||
* contrib/hbqt/hbqt_hbmk2_plugin.hbs
|
||||
+ Added #include "hbclass.ch". After 2010-11-03 23:28 UTC+0100
|
||||
it works as expect. Thanks a lot Przemek!
|
||||
Header dir is setup correctly now by hbmk2, so hbmk2 plugins
|
||||
can safely use Harbour headers. (in hbmk2 context the headers
|
||||
should be present anyway, so this is square)
|
||||
|
||||
2010-11-03 23:28 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/src/compiler/hbmain.c
|
||||
+ allow to use -p* switches in HB_COMPILEFROMBUF()
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
# See COPYING for licensing terms.
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
"-stop={dos}'hbqt' doesn't support this platform/compiler (${hb_plat}/${hb_comp})."
|
||||
|
||||
-hbcontainer
|
||||
|
||||
# Do not change this to hbqt.hbc reference.
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
#pragma -km+
|
||||
#pragma -ko+
|
||||
|
||||
#include "hbclass.ch"
|
||||
|
||||
#define I_( x ) hb_i18n_gettext( x )
|
||||
|
||||
#if defined( __HBSCRIPT__HBMK )
|
||||
|
||||
@@ -322,11 +322,6 @@ METHOD HbQtGenerator:genSource( cProFile, cPathIn, cPathOut, cPathDoc, cProject
|
||||
RETURN { nil }
|
||||
ENDIF
|
||||
|
||||
IF empty( memoread( cFile ) )
|
||||
OutStd( "Cannot read: " + cFile + hb_eol() )
|
||||
RETURN { nil }
|
||||
ENDIF
|
||||
|
||||
OutStd( "Processing: " + cFile + hb_eol() )
|
||||
|
||||
/* Mark to which sub library class belongs to */
|
||||
|
||||
@@ -377,6 +377,7 @@ DYNAMIC HB_CSTR
|
||||
DYNAMIC HB_CTOD
|
||||
DYNAMIC HB_CTOT
|
||||
DYNAMIC HB_CURDRIVE
|
||||
DYNAMIC HB_DATE
|
||||
DYNAMIC HB_DATETIME
|
||||
DYNAMIC HB_DBCREATETEMP
|
||||
DYNAMIC HB_DBDETACH
|
||||
|
||||
@@ -197,6 +197,16 @@ HB_FUNC( DAY )
|
||||
hb_errRT_BASE_SubstR( EG_ARG, 1114, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
}
|
||||
|
||||
HB_FUNC( DOW )
|
||||
{
|
||||
PHB_ITEM pDate = hb_param( 1, HB_IT_DATETIME );
|
||||
|
||||
if( pDate )
|
||||
hb_retnilen( hb_dateJulianDOW( hb_itemGetDL( pDate ) ), 3 );
|
||||
else
|
||||
hb_errRT_BASE_SubstR( EG_ARG, 1115, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
}
|
||||
|
||||
HB_FUNC( TIME )
|
||||
{
|
||||
char szResult[ 9 ];
|
||||
@@ -211,14 +221,16 @@ HB_FUNC( DATE )
|
||||
hb_retd( iYear, iMonth, iDay );
|
||||
}
|
||||
|
||||
HB_FUNC( DOW )
|
||||
HB_FUNC( HB_DATE )
|
||||
{
|
||||
PHB_ITEM pDate = hb_param( 1, HB_IT_DATETIME );
|
||||
|
||||
if( pDate )
|
||||
hb_retnilen( hb_dateJulianDOW( hb_itemGetDL( pDate ) ), 3 );
|
||||
if( hb_pcount() == 0 )
|
||||
{
|
||||
int iYear, iMonth, iDay;
|
||||
hb_dateToday( &iYear, &iMonth, &iDay );
|
||||
hb_retd( iYear, iMonth, iDay );
|
||||
}
|
||||
else
|
||||
hb_errRT_BASE_SubstR( EG_ARG, 1115, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
hb_retd( hb_parni( 1 ), hb_parni( 2 ), hb_parni( 3 ) );
|
||||
}
|
||||
|
||||
HB_FUNC( HB_DATETIME )
|
||||
@@ -229,15 +241,9 @@ HB_FUNC( HB_DATETIME )
|
||||
hb_timeStampGet( &lDate, &lTime );
|
||||
hb_rettdt( lDate, lTime );
|
||||
}
|
||||
else if( HB_ISNUM( 4 ) || HB_ISNUM( 5 ) || HB_ISNUM( 6 ) || HB_ISNUM( 7 ) )
|
||||
{
|
||||
else
|
||||
hb_rettdt( hb_dateEncode( hb_parni( 1 ), hb_parni( 2 ), hb_parni( 3 ) ),
|
||||
hb_timeEncode( hb_parni( 4 ), hb_parni( 5 ), hb_parni( 6 ), hb_parni( 7 ) ) );
|
||||
}
|
||||
else if( HB_ISNUM( 1 ) || HB_ISNUM( 2 ) || HB_ISNUM( 3 ) )
|
||||
hb_retd( hb_parni( 1 ), hb_parni( 2 ), hb_parni( 3 ) );
|
||||
else
|
||||
hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
}
|
||||
|
||||
HB_FUNC( HB_DTOT )
|
||||
|
||||
Reference in New Issue
Block a user