Skip to content

Handle more frequency options #1

@troygrosfield

Description

@troygrosfield

Would like to handle more frequency options like:

  • "last day of the month"
  • "every other week"
  • "semi annual"
  • "every other week"
  • "first of the month"

This would require some additional handling which would something along the lines of:

if freq == Frequency.WEEKLY:
    kwargs['byweekday'] = [weekday_to_int(day)
                           for day in days_of_week] if days_of_week else None
elif freq == 'semi_annual':
    kwargs['freq'] = MONTHLY
    kwargs['interval'] = 6
elif freq == 'every_other_week':
    kwargs['freq'] = WEEKLY
    kwargs['interval'] = 2
elif freq == 'same_day_of_month':
    kwargs['freq'] = MONTHLY
    kwargs['bymonthday'] = 1
elif freq == 'first_day_of_month':
    kwargs['freq'] = MONTHLY
    kwargs['bymonthday'] = 1
elif freq == 'last_day_of_month':
    kwargs['freq'] = MONTHLY
    kwargs['bymonthday'] = -1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions