Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RecurrenceRule now also allows hourly, minutely and secondly frequencies #78

Merged
merged 1 commit into from
Sep 16, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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