Function GetSunday( nMonth, nYear )
Local nCont := 0, nSunday := 0, dDayIni := cTod("01/"+StrZero(nMonth,2)+"/"+StrZero(nYear,4))
While Month(dDayIni+nCont) = nMonth
If Dow(dDayIni+nCont++) = "Sunday"
nSunday++
end
end
Return nSunday
function Sundays( dDate )
local x, d := EOM( dDate )
return If( ( x := Day( d ) - 28 ) == 0 .or. dow( d ) > x, 4, 5 )
function GetSundays( nMonth, nYear )
local x, d := EOM( STOD( Str( nYear, 4 ) + StrZero( nMonth, 2 ) + '01' ) )
return If( ( x := Day( d ) - 28 ) == 0 .or. dow( d ) > x, 4, 5 )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 95 guests