public function parseURL(SS_HTTPRequest $r)
 {
     if (!$r->param('ID')) {
         return;
     }
     $this->startDate = sfDate::getInstance(CalendarUtil::get_date_from_string($r->param('ID')));
     if ($r->param('OtherID')) {
         $this->view = "range";
         $this->endDate = sfDate::getInstance(CalendarUtil::get_date_from_string($r->param('OtherID')));
     } else {
         $d = clone $this->startDate;
         switch (strlen(str_replace("-", "", $r->param('ID')))) {
             case 8:
                 $this->view = "day";
                 $this->endDate = sfDate::getInstance($d->get() + 1);
                 break;
             case 6:
                 $this->view = "month";
                 $this->endDate = sfDate::getInstance($d->finalDayOfMonth()->date());
                 break;
             case 4:
                 $this->view = "year";
                 $this->endDate = sfDate::getInstance($d->finalDayOfYear()->date());
                 break;
             default:
                 $this->view = "default";
                 $this->endDate = sfDate::getInstance($d->addMonth($this->DefaultFutureMonths)->date());
                 break;
         }
     }
 }