How to use the rrule.MONTHLY function in rrule

To help you get started, we’ve selected a few rrule examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github codefordenver / Comrad / client / src / components / RepeatDropdown / RepeatDropdown.js View on Github external
byweekday: ['SA', 'SU'],
      },
      weekly: {
        name: `Weekly on ${dateSpelled}`,
        frequency: RRule.WEEKLY,
        byweekday: [dayToRRule[dateSpelled]],
      },
      byposition_FirstOfMonth: {
        name: `First ${dateSpelled} of the Month`,
        frequency: RRule.MONTHLY,
        byweekday: [dayToRRule[dateSpelled]],
        bysetpos: 1,
      },
      byposition_LastOfMonth: {
        name: `Last ${dateSpelled} of the Month`,
        frequency: RRule.MONTHLY,
        byweekday: [dayToRRule[dateSpelled]],
        bysetpos: -1,
      },
      byday: {
        name: `On day ${dateNumber} of the month`,
        frequency: RRule.MONTHLY,
        bymonthday: dateNumber,
      },
    };

    return rules;
  };
github Fafruch / react-rrule-generator / src / lib / utils / computeRRule / toString / computeMonthly.js View on Github external
const computeMonthly = ({
  mode,
  interval,
  on,
  onThe,
}) => ({
  freq: RRule.MONTHLY,
  interval,
  ...(mode === 'on' ? computeMonthlyOn(on) : computeMonthlyOnThe(onThe)),
});
github codefordenver / Comrad / client / src / components / RepeatDropdown / RepeatDropdown.js View on Github external
frequency: RRule.WEEKLY,
        byweekday: ['MO', 'TU', 'WE', 'TH', 'FR'],
      },
      weekends: {
        name: 'Weekends (Sat/Sun)',
        frequency: RRule.WEEKLY,
        byweekday: ['SA', 'SU'],
      },
      weekly: {
        name: `Weekly on ${dateSpelled}`,
        frequency: RRule.WEEKLY,
        byweekday: [dayToRRule[dateSpelled]],
      },
      byposition_FirstOfMonth: {
        name: `First ${dateSpelled} of the Month`,
        frequency: RRule.MONTHLY,
        byweekday: [dayToRRule[dateSpelled]],
        bysetpos: 1,
      },
      byposition_LastOfMonth: {
        name: `Last ${dateSpelled} of the Month`,
        frequency: RRule.MONTHLY,
        byweekday: [dayToRRule[dateSpelled]],
        bysetpos: -1,
      },
      byday: {
        name: `On day ${dateNumber} of the month`,
        frequency: RRule.MONTHLY,
        bymonthday: dateNumber,
      },
    };
github mattlewis92 / angular-calendar / projects / demos / app / demo-modules / recurring-events / component.ts View on Github external
@Component({
  selector: 'mwl-demo-component',
  changeDetection: ChangeDetectionStrategy.OnPush,
  templateUrl: 'template.html'
})
export class DemoComponent {
  view: CalendarView = CalendarView.Month;

  viewDate = moment().toDate();

  recurringEvents: RecurringEvent[] = [
    {
      title: 'Recurs on the 5th of each month',
      color: colors.yellow,
      rrule: {
        freq: RRule.MONTHLY,
        bymonthday: 5
      }
    },
    {
      title: 'Recurs yearly on the 10th of the current month',
      color: colors.blue,
      rrule: {
        freq: RRule.YEARLY,
        bymonth: moment().month() + 1,
        bymonthday: 10
      }
    },
    {
      title: 'Recurs weekly on mondays',
      color: colors.red,
      rrule: {
github superdesk / superdesk-planning / client / utils / events.js View on Github external
const doesRecurringEventsOverlap = (startingDate, endingDate, recurringRule) => {
    if (!recurringRule || !startingDate || !endingDate ||
        !('frequency' in recurringRule) || !('interval' in recurringRule)) return false;

    const freqMap = {
        YEARLY: RRule.YEARLY,
        MONTHLY: RRule.MONTHLY,
        WEEKLY: RRule.WEEKLY,
        DAILY: RRule.DAILY,
    };

    const dayMap = {
        MO: RRule.MO,
        TU: RRule.TU,
        WE: RRule.WE,
        TH: RRule.TH,
        FR: RRule.FR,
        SA: RRule.SA,
        SU: RRule.SU,
    };

    const rules = {
        freq: freqMap[recurringRule.frequency],