First Question
I have a boost date object as follows:
boost::gregorian::date Today(2012, 02, 13)
I substract a datepart from Today as follows:
Today - months(240) or Today - days(X) etc ..
I would like to if there is a way to exclude weekends and special holidays when doing the above subtraction? I mean if Today is Wednesday, Today - days(4) should be last Friday.
Second Question
Similarly, i use something like the following to do time manipulations:
ptime ptNow(day_clock::local_day()); ptNow - minutes(1170);
- Again is there a way to ignore weekends/holidays from minutes/hours substraction?
- i really want my 1170 minutes to be 1170 trading minutes (which is 19.5 trading hours / 6.5 hours a day). In otherwords i want my start of the day to be 9:30 AM EST and End to be 16:00 PM EST and If i call ptNow - minutes(1170), it should take me back to 1170 trading minutes.