How to use the icalendar.vRecur.from_ical function in icalendar

To help you get started, we’ve selected a few icalendar 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 pimutils / khal / tests / ui / test_editor.py View on Github external
icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYSETPOS=1')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,SU,MO,TH,FR,TU,SA;BYSETPOS=1')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,MO,TH,FR,TU,SA;BYSETPOS=1')
    )
    assert not RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=-1SU')
    )
    assert not RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYMONTHDAY=1,2,3,4,5,6,7')
    )
    assert not RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYMONTHDAY=-1')
    )
    assert not RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYSETPOS=3')
    )
github pimutils / khal / tests / ui / test_editor.py View on Github external
def test_check_understood_rrule():
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=1SU')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYMONTHDAY=1')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYSETPOS=1')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TU,TH;BYSETPOS=1')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYSETPOS=1')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,SU,MO,TH,FR,TU,SA;BYSETPOS=1')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,MO,TH,FR,TU,SA;BYSETPOS=1')
    )
    assert not RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=-1SU')
    )
    assert not RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYMONTHDAY=1,2,3,4,5,6,7')
    )
github pimutils / khal / tests / ui / test_editor.py View on Github external
def test_check_understood_rrule():
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=1SU')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYMONTHDAY=1')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYSETPOS=1')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TU,TH;BYSETPOS=1')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYSETPOS=1')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,SU,MO,TH,FR,TU,SA;BYSETPOS=1')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,MO,TH,FR,TU,SA;BYSETPOS=1')
    )
    assert not RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=-1SU')
    )
github pimutils / khal / tests / ui / test_editor.py View on Github external
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYMONTHDAY=1')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYSETPOS=1')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TU,TH;BYSETPOS=1')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYSETPOS=1')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,SU,MO,TH,FR,TU,SA;BYSETPOS=1')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,MO,TH,FR,TU,SA;BYSETPOS=1')
    )
    assert not RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=-1SU')
    )
    assert not RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYMONTHDAY=1,2,3,4,5,6,7')
    )
    assert not RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYMONTHDAY=-1')
    )
    assert not RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYSETPOS=3')
    )
github pimutils / khal / tests / ui / test_editor.py View on Github external
icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,SU,MO,TH,FR,TU,SA;BYSETPOS=1')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,MO,TH,FR,TU,SA;BYSETPOS=1')
    )
    assert not RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=-1SU')
    )
    assert not RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYMONTHDAY=1,2,3,4,5,6,7')
    )
    assert not RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYMONTHDAY=-1')
    )
    assert not RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYSETPOS=3')
    )
github pimutils / khal / tests / ui / test_editor.py View on Github external
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYSETPOS=1')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TU,TH;BYSETPOS=1')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYSETPOS=1')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,SU,MO,TH,FR,TU,SA;BYSETPOS=1')
    )
    assert RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,MO,TH,FR,TU,SA;BYSETPOS=1')
    )
    assert not RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=-1SU')
    )
    assert not RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYMONTHDAY=1,2,3,4,5,6,7')
    )
    assert not RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYMONTHDAY=-1')
    )
    assert not RecurrenceEditor.check_understood_rrule(
        icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYSETPOS=3')
    )