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

RRULE:FREQ=WEEKLY - missing first event of the year #251

Closed
gavinr opened this issue Jan 3, 2020 · 3 comments · Fixed by #256
Closed

RRULE:FREQ=WEEKLY - missing first event of the year #251

gavinr opened this issue Jan 3, 2020 · 3 comments · Fixed by #256

Comments

@gavinr
Copy link

gavinr commented Jan 3, 2020

  • PHP Version: 7.2.24
  • ICS Parser Version: 2.1.16
  • Linux

Description of the Issue:

If you have an event that repeats weekly, and the original start date is on december 30, the first event of the new year (should be on jan 6) is missed. Example ICS: example.zip.

image

Steps to Reproduce:

  1. Run against the attached ICS.
s0600204 added a commit to s0600204/ics-parser-1 that referenced this issue Jan 17, 2020
When setting the date for an occurrence of a recurring event where the `RRULE`
has a frequency of `WEEKLY` and `BYDAY` was used, the `setISODate()` method is
used.

Unfortunately, I had used `Y` instead of `o` as the date format code for getting
the current year, thus feeding the Gregorian year instead of the ISO year into
the method.

This was causing some year-start/end edge-case errors, as described in u01jmg3#251.

Essentially, I was committing the opposite of the error that Twitter is thought
to have made in late 2014, as described in this video by Tom Scott:
https://www.youtube.com/watch?v=D3jxx8Yyw1c (They should have used Gregorian and
were using ISO, we should have been using ISO and were using Gregorian.)
@u01jmg3
Copy link
Owner

u01jmg3 commented Jan 17, 2020

A new release will be coming shortly but dev-master should fix your issue

@gavinr
Copy link
Author

gavinr commented Jan 17, 2020

@u01jmg3 - great - thank you VERY much for looking into this and fixing it!

@u01jmg3
Copy link
Owner

u01jmg3 commented Jan 17, 2020

Thanks goes to @s0600204

@u01jmg3 u01jmg3 removed their assignment Mar 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants