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

Minutely rule (frequency = 1) text typo #406

Closed
7 tasks done
JESUS-PEREZ opened this issue Jun 17, 2020 · 2 comments
Closed
7 tasks done

Minutely rule (frequency = 1) text typo #406

JESUS-PEREZ opened this issue Jun 17, 2020 · 2 comments

Comments

@JESUS-PEREZ
Copy link

JESUS-PEREZ commented Jun 17, 2020

Reporting an issue

  • Verify that you've looked through existing issues for duplicates before
    creating a new one
  • Code sample reproducing the issue. Be sure to include all input values you
    are using such as the exact RRule string and dates.

DTSTART:20200617T160200Z↵RRULE:FREQ=MINUTELY;INTERVAL=1;COUNT=3

  • Expected output: Every minute for 3 times
  • Actual output: Every minutes for 3 times
  • The version of rrule you are using: v2.6.4
  • Your operating system: Windows
  • Your local timezone: Europe/London

Hello,

There is a typo at the time of building the text for a minutely rule where the frequency is 1.

Expected output: every minute for 3 times.
Actual output: every minutes for 3 times.
Version: 2.6.4

I had a look at the source code and I have identified where the issue is. I have tried to create a PR but it is not allowed.

https://github.com/jakubroztocil/rrule/blob/v2.6.4/src/nlp/totext.ts

image

As you can see in the picture, for hourly rules it is using a different string depending on whether the rule is singular/plural. However, for minutely rule it is always using plural string.

@tbjgolden
Copy link
Contributor

was about to create this! nice find

@jakubroztocil

@jkbrzt
Copy link
Owner

jkbrzt commented Aug 11, 2020

Nice find indeed! I’ll be happy to accept a PR. Ideally with a test case.

@tbjgolden tbjgolden mentioned this issue Aug 18, 2020
3 tasks
@jkbrzt jkbrzt closed this as completed Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants