Files
harbour-core/contrib/hbct/tests/dates4.prg
vszakats a4a357a18b 2013-03-15 11:12 UTC+0100 Viktor Szakats (harbour syenar.net)
* /harbour/* -> /*
    * moved whole Harbour source tree one level up to
      avoid single 'harbour' top dir
2013-03-15 11:13:30 +01:00

38 lines
633 B
Plaintext

/*
* $Id$
*/
#ifdef __HARBOUR__
#require "hbct"
#endif
// Testing Harbour dates management.
PROCEDURE Main()
LOCAL i
LOCAL dDate := Date()
Set( _SET_DATEFORMAT, "yyyy-mm-dd" )
FOR i := 7 TO 49 STEP 7
CheckDate( dDate )
dDate += i
NEXT
RETURN
FUNCTION CheckDate( dDate )
? "Testing date:", dDate
? "Days in month..:", DaysInMonth( dDate )
? "Day of year....:", DoY( dDate )
? "Begin of month.:", BoM( dDate )
? "End of month...:", EoM( dDate )
? "Week of month..:", WoM( dDate )
? "Begin of year..:", BoY( dDate )
? "End of year....:", EoY( dDate )
?
RETURN NIL