class TradingWeekImpl extends JodaWorkingWeek implements TradingWeek {

    @Override
	public int getTradingDaysInMonth(DateTime dt) {
        //Get the first valid/configured trading date within the specified date's month
        dt = getSessionTradingDate(dt.dayOfMonth().withMinimumValue());
        
        int month = dt.getMonthOfYear();
        int sessionIdx = sessions.indexOf(getTradingSessionOnOrAfter(dt));
        int prevday = 0;
        int nextday = 0;
        int days = 0;
        int sessionLen = sessions.size();
        DateTime workingDate = new DateTime(dt);
        int tradingDayCount = 0;
        while(workingDate.getMonthOfYear() == month) {
            do {
                prevday = sessions.get(sessionIdx).day();
                if(++sessionIdx == sessionLen) {
                    sessionIdx = 0;
                }
                nextday = sessions.get(sessionIdx).day();
                
                days += naturalDaysBetween(prevday, nextday);
                workingDate = dt.plusDays(days);
            } while(calculator.isNonWorkingDay(workingDate.toLocalDate()) &&
                    workingDate.getMonthOfYear() == month);
            
            ++tradingDayCount;
        }
        
        return tradingDayCount;
    }

    private  TradingWeekImpl(byte tradingDays);

}