Files
harbour-core/contrib/hbct/tests/dates4.prg
Przemysław Czerpak 96ca3fe470 2014-01-21 20:41 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* Makefile
  * config/*
  * contrib/*
  * doc/*
  * extras/*
  * include/*
  * lib/*
  * package/*
  * src/*
  * tests/*
  * utils/*
    * removed empty lines left after removed '$' + 'Id' + '$' identifiers
2014-01-21 20:41:05 +01:00

34 lines
617 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