protected function createYearFlydown()
    {
        $flydown = new SwatFlydown($this->id . '_year');
        $flydown->classes = array('swat-date-entry-year');

        if ($this->show_blank_titles) {
            $flydown->blank_title = $this->getYearBlankValueTitle();
        }

        $start_year = $this->valid_range_start->getYear();

        // Subtract a second from the end date. Since end date is exclusive,
        // this means that if the end date is the first of a year, we'll
        // prevent showing that year in the flydown.
        $range_end = clone $this->valid_range_end;
        $range_end->subtractSeconds(1);
        $end_year = $range_end->getYear();

        for ($i = $start_year; $i <= $end_year; $i++) {
            $flydown->addOption($i, $i);
        }

        return $flydown;
    }