do
> what I am looking for.
>
> Any idea how I can get this set up ? Any help is much appreciated.
Here are some ideas, although I have left the a full implementation
as an exercise for the reader
local prevBusDat = date //or any starting date
loop forever //for (;1;) in Powerpro
prevBusDate = date.addDays(prevBusDate, -1)
if (date.weekday(prevBusDate))== 0) // if sunday
prevBusDate = date.addDays(prevBusDate, -2) // change to friday
if (prevBusDate is not a holiday)
break out of loop
endloop
How to check for a holiday? One simple way would be to file.readall
a file consisting off all the dates which are holidays (in format
yyyymmdd, separate by space or new line). Then just use string find.
Also note that formatdate("dd/MM/yyyy" ,prevBusDate) should give you
the look you want more sipmly.