I am trying to calculate the number of trading days between two dates.

 

I am trying to use

DateTime end = new DateTime(2018, 4, 18); var monthTradingdays = TradingCalendar.GetDaysByType(TradingDayType.BusinessDay, Time, end).ToArray();

but then I do not know how to proceed from this point...

 

Just need the trading calendar for regular US stocks like SPY.

 

Thanks a lot!