* contrib/hbmysql/tmysql.prg
* contrib/hbnf/doc/en/restsets.txt
* contrib/hbnf/doc/en/savesets.txt
* contrib/hbnf/pvid.prg
* contrib/hbnf/restsets.prg
* contrib/hbnf/savesets.prg
* contrib/rddads/tests/testmg.prg
* contrib/xhb/traceprg.prg
* contrib/xhb/ttable.prg
* contrib/xhb/xhberr.prg
* ChangeLog.txt
* extras/gtwvw/tests/ebtest7.prg
* src/debug/debugger.prg
* tests/dates.prg
* tests/dates2.prg
* tests/dates3.prg
* tests/inherit.prg
* tests/output.prg
* tests/readhrb.prg
* tests/set_num.prg
* tests/set_test.prg
* tests/stripem.prg
* tests/tstcolor.prg
* website/samples/dates3.prg.html
% do not #include "set.ch" (it's automatically
included via "std.ch")
69 lines
1.5 KiB
HTML
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 dates 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
|
|
? CToD( "" ), DoW( CToD( "" ) )
|
|
|
|
RETURN
|
|
|
|
// Like NG's sample
|
|
|
|
FUNCTION LastMonday( dDate )
|
|
|
|
RETURN dDate - DoW( dDate ) + 2
|
|
|
|
]]></script>
|
|
|
|
</body>
|
|
</html>
|