mirror of
https://github.com/rlanvin/php-rrule.git
synced 2025-02-20 09:54:16 +01:00
Omitting repetition ending date
Sometimes it can be useful to omit the repetition ending date if printing a human readable string, so I added this option.
This commit is contained in:
parent
15646f89da
commit
6758beef76
@ -2092,7 +2092,8 @@ class RRule implements RRuleInterface
|
|||||||
'explicit_infinite' => true,
|
'explicit_infinite' => true,
|
||||||
'include_start' => true,
|
'include_start' => true,
|
||||||
'include_until' => true,
|
'include_until' => true,
|
||||||
'custom_path' => null
|
'custom_path' => null,
|
||||||
|
'omit_until_date' => false
|
||||||
);
|
);
|
||||||
|
|
||||||
// attempt to detect default locale
|
// attempt to detect default locale
|
||||||
@ -2369,7 +2370,7 @@ class RRule implements RRuleInterface
|
|||||||
$parts['end'] = $i18n['infinite'];
|
$parts['end'] = $i18n['infinite'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif ($this->until) {
|
elseif ($this->until && !$opt['omit_until_date']) {
|
||||||
$parts['end'] = strtr($i18n['until'], array(
|
$parts['end'] = strtr($i18n['until'], array(
|
||||||
'%{date}' => $opt['date_formatter']($this->until)
|
'%{date}' => $opt['date_formatter']($this->until)
|
||||||
));
|
));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user