Skip to content

Multiple weekdays BYDAY & ordinals BYSETPOS Problem #31

Description

@perrelet

Hi @marcbelletre,

I'm aware you put a lot of energy into #8 thank you for this 🙏

Unfortunately there's a pretty major issue with this implementation. If a user selects multiple weekdays (BYDAY) and multiple ordinal numbers (BYSETPOS) the returned occurrences aren't what the user expects. For example:

image

Produces the following dates:

Mon 4th Nov
Tues 5th Nov
Mon 11th Nov

However the user understandably expects:

Mon 4th Nov
Tues 5th Nov
Mon 11th Nov
Tues 12th Nov
Mon 18th Nov
Tues 19th Nov

This is because BYSETPOS does not represent weeks but simply the nth instance once you have calculated the instances corresponding to the remaining of the rule. It appears having both fields as a checkbox groups provides too much freedom to make selections that don't actually make logical sense.

  1. The user should only be able to select a single BYDAY if they have selected multiple BYSETPOS.
  2. The user shouldn't be able to set a BYSETPOS at all if they have set multiple BYDAY.

What are your thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions