* website/samples/*.*.html
% pointed compatibility .js link to the project's cloud server
71 lines
1.5 KiB
HTML
71 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.
|
|
|
|
#include "set.ch"
|
|
|
|
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>
|