See ChangeLog entry 19990524-19:20 EST David G. Holm <dholm@jsd-llc.com>
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
19990524-19:20 EST David G. Holm <dholm@jsd-llc.com>
|
||||
* source/rtl/dates.c
|
||||
- Added HARBOUR DATE() function.
|
||||
* tests/working/dates.prg
|
||||
- Added use of DATE() function in first OUTSTD call.
|
||||
|
||||
19990524-21:05 CET Eddie Runia
|
||||
* source/rtl/strings.c
|
||||
PAD* didn't work correctly with negative numbers
|
||||
|
||||
@@ -425,3 +425,26 @@ oTime->tm_sec);
|
||||
}
|
||||
}
|
||||
|
||||
HARBOUR DATE( void )
|
||||
{
|
||||
if( _pcount() == 0 )
|
||||
{
|
||||
time_t t;
|
||||
struct tm *oTime;
|
||||
char szTime[9];
|
||||
|
||||
time(&t);
|
||||
oTime = localtime(&t);
|
||||
sprintf(szTime, "%04d%02d%02d", oTime->tm_year, oTime->tm_mon + 1,
|
||||
oTime->tm_mday);
|
||||
_retds(szTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* QUESTION: Clipper catches this at compile time! */
|
||||
PITEM pError = _errNew();
|
||||
_errPutDescription(pError, "Incorrect number of arguments: DATE");
|
||||
_errLaunch(pError);
|
||||
_errRelease(pError);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ local cNewLine := CHR( 10 )
|
||||
|
||||
local dDate, dDate2, cMask, cDate
|
||||
|
||||
OUTSTD (cNewLine, "Testing Harbour dates management", cNewLine)
|
||||
OUTSTD (cNewLine, "Testing Harbour dates management on", DATE(), cNewLine)
|
||||
|
||||
OUTSTD (cNewLine, HB_SETCENTURY ())
|
||||
HB_SETCENTURY ("ON")
|
||||
|
||||
Reference in New Issue
Block a user