1
0
mirror of https://github.com/rlanvin/php-rrule.git synced 2025-02-21 10:54:14 +01:00

Rename 'dtsart' option to 'include_start' in humanReadable

This commit is contained in:
rlanvin 2017-04-11 16:49:46 +01:00
parent 67d4a5dc98
commit 59d9226618
3 changed files with 5 additions and 5 deletions

View File

@ -4,7 +4,7 @@
### Added ### Added
- Add `explicit_infinite` and `dtstart` options to `humanReadable` to respectivity omit "forever" and the start date from the sentence. - Add `explicit_infinite` and `include_start` options to `humanReadable` to respectivity omit "forever" and the start date from the sentence.
- RSet constructor now accepts a string to build a RSET from a RFC string [#26](https://github.com/rlanvin/php-rrule/issues/26) - RSet constructor now accepts a string to build a RSET from a RFC string [#26](https://github.com/rlanvin/php-rrule/issues/26)
- New factory method `RRule::createFromRfcString()` to build either a RRule or a RSet from a string - New factory method `RRule::createFromRfcString()` to build either a RRule or a RSet from a string

View File

@ -2314,7 +2314,7 @@ class RRule implements RRuleInterface
'date_formatter' => null, 'date_formatter' => null,
'fallback' => 'en', 'fallback' => 'en',
'explicit_infinite' => true, 'explicit_infinite' => true,
'dtstart' => true 'include_start' => true
); );
// attempt to detect default locale // attempt to detect default locale
@ -2558,7 +2558,7 @@ class RRule implements RRuleInterface
$parts['bysetpos'] = $tmp; $parts['bysetpos'] = $tmp;
} }
if ( $opt['dtstart'] ) { if ( $opt['include_start'] ) {
// from X // from X
$parts['start'] = strtr($i18n['dtstart'], array( $parts['start'] = strtr($i18n['dtstart'], array(
'%{date}' => $opt['date_formatter']($this->dtstart) '%{date}' => $opt['date_formatter']($this->dtstart)

View File

@ -2658,7 +2658,7 @@ class RRuleTest extends PHPUnit_Framework_TestCase
), ),
array( array(
"DTSTART;TZID=America/New_York:19970901T090000\nRRULE:FREQ=DAILY;UNTIL=20170205T000000Z", "DTSTART;TZID=America/New_York:19970901T090000\nRRULE:FREQ=DAILY;UNTIL=20170205T000000Z",
array('locale' => "en_IE", 'dtstart' => false), array('locale' => "en_IE", 'include_start' => false),
"daily, until 04/02/2017" "daily, until 04/02/2017"
), ),
array( array(
@ -2673,7 +2673,7 @@ class RRuleTest extends PHPUnit_Framework_TestCase
), ),
array( array(
"FREQ=DAILY", "FREQ=DAILY",
array('locale' => "en_IE", 'dtstart' => false, 'explicit_infinite' => false), array('locale' => "en_IE", 'include_start' => false, 'explicit_infinite' => false),
"daily" "daily"
), ),
); );