Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Business Days...
#6
Changed the example too...

Function IsTodayHoliday
Code:
Copy      Help
function DATE&d
;Returns 1 if today is a holiday (Sunday, Saturday, etc), 0 if not.
;Uses "$my qm$\nbd.ini" that is created using macro "Create Holidays File". Error if the file does not exist.

;EXAMPLE
;DATE d="12/25/09"
;if IsTodayHoliday(d)
,;out "Holiday"


str inifile="$my qm$\nbd.ini"
if(!dir(inifile)) mes- "File not found:[]%s[][]Read macro 'Create Holidays File'." "" "x" inifile

SYSTEMTIME st
d.tosystemtime(st)
str s1 s2(st.wDay) s3.format("%i-%i" st.wYear st.wMonth)
ret rget(s1 s2 s3 inifile)


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)