Skip to content

Commit

Permalink
Merge pull request #78 from SHyx0rmZ/allow-timely-frequencies-for-rec…
Browse files Browse the repository at this point in the history
…urrence-rules

RecurrenceRule now also allows hourly, minutely and secondly frequencies
  • Loading branch information
markuspoerschke authored Sep 16, 2016
2 parents da7987e + 73323ed commit 6da69a2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Eluceo/iCal/Property/Event/RecurrenceRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@
*/
class RecurrenceRule implements ValueInterface
{
const FREQ_YEARLY = 'YEARLY';
const FREQ_MONTHLY = 'MONTHLY';
const FREQ_WEEKLY = 'WEEKLY';
const FREQ_DAILY = 'DAILY';
const FREQ_YEARLY = 'YEARLY';
const FREQ_MONTHLY = 'MONTHLY';
const FREQ_WEEKLY = 'WEEKLY';
const FREQ_DAILY = 'DAILY';
const FREQ_HOURLY = 'HOURLY';
const FREQ_MINUTELY = 'MINUTELY';
const FREQ_SECONDLY = 'SECONDLY';

const WEEKDAY_SUNDAY = 'SU';
const WEEKDAY_MONDAY = 'MO';
Expand Down Expand Up @@ -235,10 +238,7 @@ public function getUntil()
*/
public function setFreq($freq)
{
if (self::FREQ_YEARLY === $freq || self::FREQ_MONTHLY === $freq
|| self::FREQ_WEEKLY === $freq
|| self::FREQ_DAILY === $freq
) {
if (@constant('static::FREQ_' . $freq) !== null) {
$this->freq = $freq;
} else {
throw new \InvalidArgumentException("The Frequency {$freq} is not supported.");
Expand Down

0 comments on commit 6da69a2

Please sign in to comment.