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

Does not repeat within the defined tsrange #4

Open
gajus opened this issue Mar 16, 2020 · 1 comment
Open

Does not repeat within the defined tsrange #4

gajus opened this issue Mar 16, 2020 · 1 comment

Comments

@gajus
Copy link

gajus commented Mar 16, 2020

select *
FROM
  occurrences('
    DTSTART:20200301T000000
    RRULE:FREQ=WEEKLY'::TEXT::rruleset, tsrange('2020-03-01 00:00', '2021-04-01 00:00'));

Produces:

"occurrences"
"2020-03-01 00:00:00"
"2020-03-08 00:00:00"

I expect to get 57 rows (as there are 57 weeks in the time range), but I am only getting 2 rows.

Adding an arbitrary large COUNT "fixes" the problem.

select *
FROM
  occurrences('
    DTSTART:20200301T000000
    RRULE:FREQ=WEEKLY;COUNT=1000'::TEXT::rruleset, tsrange('2020-03-01 00:00', '2021-04-01 00:00'));

Produces:

"occurrences"
"2020-03-01 00:00:00"
"2020-03-08 00:00:00"
"2020-03-15 00:00:00"
"2020-03-22 00:00:00"
"2020-03-29 00:00:00"
"2020-04-05 00:00:00"
"2020-04-12 00:00:00"
"2020-04-19 00:00:00"
"2020-04-26 00:00:00"
"2020-05-03 00:00:00"
"2020-05-10 00:00:00"
"2020-05-17 00:00:00"
"2020-05-24 00:00:00"
"2020-05-31 00:00:00"
"2020-06-07 00:00:00"
"2020-06-14 00:00:00"
"2020-06-21 00:00:00"
"2020-06-28 00:00:00"
"2020-07-05 00:00:00"
"2020-07-12 00:00:00"
"2020-07-19 00:00:00"
"2020-07-26 00:00:00"
"2020-08-02 00:00:00"
"2020-08-09 00:00:00"
"2020-08-16 00:00:00"
"2020-08-23 00:00:00"
"2020-08-30 00:00:00"
"2020-09-06 00:00:00"
"2020-09-13 00:00:00"
"2020-09-20 00:00:00"
"2020-09-27 00:00:00"
"2020-10-04 00:00:00"
"2020-10-11 00:00:00"
"2020-10-18 00:00:00"
"2020-10-25 00:00:00"
"2020-11-01 00:00:00"
"2020-11-08 00:00:00"
"2020-11-15 00:00:00"
"2020-11-22 00:00:00"
"2020-11-29 00:00:00"
"2020-12-06 00:00:00"
"2020-12-13 00:00:00"
"2020-12-20 00:00:00"
"2020-12-27 00:00:00"
"2021-01-03 00:00:00"
"2021-01-10 00:00:00"
"2021-01-17 00:00:00"
"2021-01-24 00:00:00"
"2021-01-31 00:00:00"
"2021-02-07 00:00:00"
"2021-02-14 00:00:00"
"2021-02-21 00:00:00"
"2021-02-28 00:00:00"
"2021-03-07 00:00:00"
"2021-03-14 00:00:00"
"2021-03-21 00:00:00"
"2021-03-28 00:00:00"


@treystout
Copy link

same here. We almost only create weekly events in our app so I set the count to 50,000 for "infinite" series.

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

2 participants