public function renderDay(DayInterface $day)
    {
        $classes = array();

        $dayOfWeek = $day->dayOfWeek();

        if (DayInterface::SATURDAY === $dayOfWeek || DayInterface::SUNDAY === $dayOfWeek) {
            $classes[] = 'bm-calendar-weekend';
        }

        foreach ($day->getStates() as $state) {
            $classes[] = 'bm-calendar-state-' . $state->type();
        }

        $output  = '<td>';
        if (sizeof($classes)) {
            $output  = '<td class="' . implode(' ', $classes) . '">';
        }

        if ($day->getAction()) {
            $output .= '<a href="' . htmlentities($day->getAction()) . '">' . $day . '</a>';
        } else {
            $output .= $day;
        }


        $output .= '</td>';

        return $output;
    }