TradingDaysBetweenDates is obsolete
Author: MrIzzy
Creation Date: 9/24/2012 1:02 PM
profile picture

MrIzzy

#1
Hi There,

I was using an older version of CommunityComponents. I understand that the new version no longer supports the function "TradingDaysBetweenDates". What should I use instead? My existing line l0ooks like this:

barsToNextEvent = c.TradingDaysBetweenDates(Date[Bar], fi.Date);


Thank you in advance,
Izzy
profile picture

Eugene

#2
It's all on the change log:

6/22/2011 Changed: Calculate.GetWeekNumber/DaysBetweenDates/GetRemainingTradingDays/TradingDaysBetweenDates became obsolete, were moved to DateTimeFunctions. Due to their exclusion in a later release, use their DateTimeFunctions analogues.
profile picture

MrIzzy

#3
Hi there,

What is the analogy in DateTimeFunctions for TradingDaysBetweenDates?
Can you please write a one liner sample to replicate the line above?

Thanks,
Izzy
profile picture

Cone

#4
Documented with full example here.

Just instantiate a DateTimeFunctions object and use its TradingDaysBetweenDates method.
profile picture

MrIzzy

#5
Thannk you, kindly
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).