Files
harbour-core/harbour/tests/dates3.prg
Viktor Szakats e93d9d53b5 2013-02-02 19:53 UTC+0100 Viktor Szakats (harbour syenar.net)
* utils/hbmk2/hbmk2.*.po
  * utils/hbmk2/hbmk2.prg
    * further clarification around -comp/-plat help texts

  * README.txt
    ! typos

  * contrib/hbnf/setlastk.c
    ! map to HB_KEYSETLAST() instead of deprecated synonym

  * contrib/hbct/charlihb.c
  * contrib/hbct/charophb.c
  * contrib/hbct/ctwfunc.c
  * contrib/hbct/disk.c
  * contrib/hbct/screen1.c
    + HB_EXTENSION tags for Harbour extensions

  * contrib/hbct/screen2.c
    + TODOs for missing unicode support

  * contrib/hbct/tests/csetarge.prg
    + NOTE why CTOD( "" ) must be used here

  * tests/dates3.prg
  * website/samples/dates3.prg.html
    * use HB_STOD() instead of CTOD( "" )
    ! typos

  * tests/transtst.prg
    * use HB_STOD() instead of STOD()

  * contrib/hbtinymt/3rd/tinymt/tinymt.hbp
  * contrib/hbtinymt/3rd/tinymt/*
  * src/3rd/jpeg/Makefile
  * src/3rd/jpeg/*
  * src/3rd/png/Makefile
  * src/3rd/png/*
    * updated using 3rdpatch to
      jpeg 9, libpng 1.5.14, tinymt 1.0.2

  * contrib/hbct/cterror.ch
  * contrib/hbct/video.c
  * contrib/hbnf/popadder.prg
  * contrib/hbnf/xbox.prg
  * bin/harbour.ucf
    * formatting
2013-02-02 19:01:40 +00:00

52 lines
727 B
Plaintext

/*
* $Id$
*/
// Testing Harbour date management
PROCEDURE Main()
LOCAL dDate, i
Set( _SET_DATEFORMAT, "dd/mm/yyyy" )
dDate := hb_SToD( "19990525" )
? dDate, DoW( dDate )
? LastMonday( dDate )
dDate += 3
? dDate, DoW( dDate )
dDate += 4
? dDate, DoW( dDate )
Set( _SET_DATEFORMAT, "mm/dd/yyyy" )
dDate := hb_SToD( "19990525" )
? dDate, DoW( dDate )
? LastMonday( dDate )
dDate += 3
? dDate, DoW( dDate )
dDate += 4
? dDate, DoW( dDate )
?
dDate := Date()
FOR i := 1 TO 7
? dDate, DoW( dDate )
dDate++
NEXT
? hb_SToD(), DoW( hb_SToD() )
RETURN
// Like NG's sample
FUNCTION LastMonday( dDate )
RETURN dDate - DoW( dDate ) + 2