Files
harbour-core/harbour/website/samples/dates3.prg.html
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

69 lines
1.5 KiB
HTML

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="utf-8">
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/xregexp/2.0.0/xregexp-min.js"></script>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/xregexp/2.0.0/backcompat.js"></script>
<script type="text/javascript" src="/js/shCore.js"></script>
<script type="text/javascript" src="/js/shBrushHarbour.js"></script>
<link href="/css/shCore.css" rel="stylesheet" type="text/css" />
<link href="/css/shThemeDefault.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">SyntaxHighlighter.all()</script>
</head>
<body>
<script type="syntaxhighlighter" class="brush: harbour; light: true"><![CDATA[
// 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
]]></script>
</body>
</html>