protected function addByMonthDay(Rule $rule)
{
$byMonthDay = $rule->getByMonthDay();
$byDay = $rule->getByDay();
if (!empty($byDay)) {
$this->addFragment($this->translator->trans('on'));
$this->addFragment($this->getByDayAsText($byDay, 'or'));
$this->addFragment($this->translator->trans('the_for_monthday'));
$this->addFragment($this->getByMonthDayAsText($byMonthDay, 'or'));
} else {
$this->addFragment($this->translator->trans('on the'));
$this->addFragment($this->getByMonthDayAsText($byMonthDay, 'and'));
}
}