public function setEndDate(AnCommandContext $context)
    {
        $data = $context->data;

        if ($data->day || $data->month || $data->year) {
            $date = new AnDate();
            $date->day((int) $data->day);
            $date->month((int) $data->month);
            $date->year((int) $data->year);
            $data->endDate = $date;
        }
    }