Files
harbour-core/contrib/hbct/tests/dates4.prg
vszakats 9687850865 2013-03-16 02:10 UTC+0100 Viktor Szakats (harbour syenar.net)
* (all files)
    * stripped svn header
    * minor cleanups
    ; use following command to find out the history of files:
       git log
       git log --follow
       git blame
       git annotate
2013-03-16 02:11:42 +01:00

35 lines
618 B
Plaintext

#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