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

Parsing bug in rrulestr function #587

Open
7 tasks done
yim-jj opened this issue Jun 21, 2023 · 1 comment
Open
7 tasks done

Parsing bug in rrulestr function #587

yim-jj opened this issue Jun 21, 2023 · 1 comment

Comments

@yim-jj
Copy link

yim-jj commented Jun 21, 2023

Reporting an issue

Thank you for taking an interest in rrule! Please include the following in
your report:

  • 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.
rrulestr(
        "DTSTART;TZID=Asia/Seoul:20230628T143000\nRRULE:FREQ=WEEKLY;INTERVAL=1;WKST=MO;BYDAY=WE;BYHOUR=14;BYMINUTE=30;BYSECOND=0;UNTIL=20230705T142900\nDTSTART;TZID=Asia/Seoul:20230712T143000\nRRULE:INTERVAL=1;FREQ=WEEKLY;BYDAY=WE",
        {
          forceset: true,
        }
      )
  • Expected output
    Since rruleset has two rrules, and each dtstart is 20230628T143000 and 20230712T143000, the dtstarts of rrules parsed through rrulestr must also be parsed as different dtstarts.
  • Actual output
    Although dtstart points to different rrules, the dtstart of each rrule is the same as shown below.
{
    "_cache": null,
    "origOptions": {},
    "options": {
        "freq": 0,
        "dtstart": "2023-06-21T07:24:15.000Z",
        "interval": 1,
        "wkst": 0,
        "count": null,
        "until": null,
        "tzid": null,
        "bysetpos": null,
        "bymonth": [
            6
        ],
        "bymonthday": [
            21
        ],
        "bynmonthday": [],
        "byyearday": null,
        "byweekno": null,
        "byweekday": null,
        "bynweekday": null,
        "byhour": [
            7
        ],
        "byminute": [
            24
        ],
        "bysecond": [
            15
        ],
        "byeaster": null
    },
    "_rrule": [
        {
            "_cache": null,
            "origOptions": {
                "freq": 2,
                "interval": 1,
                "wkst": {
                    "weekday": 0
                },
                "byweekday": [
                    {
                        "weekday": 2
                    }
                ],
                "byhour": 14,
                "byminute": 30,
                "bysecond": 0,
                "until": "2023-07-05T14:29:00.000Z",
                "dtstart": "2023-06-28T14:30:00.000Z",
                "tzid": "Asia/Seoul"
            },
            "options": {
                "freq": 2,
                "dtstart": "2023-06-28T14:30:00.000Z",
                "interval": 1,
                "wkst": 0,
                "count": null,
                "until": "2023-07-05T14:29:00.000Z",
                "tzid": "Asia/Seoul",
                "bysetpos": null,
                "bymonth": null,
                "bymonthday": [],
                "bynmonthday": [],
                "byyearday": null,
                "byweekno": null,
                "byweekday": [
                    2
                ],
                "bynweekday": null,
                "byhour": [
                    14
                ],
                "byminute": [
                    30
                ],
                "bysecond": [
                    0
                ],
                "byeaster": null
            }
        },
        {
            "_cache": null,
            "origOptions": {
                "interval": 1,
                "freq": 2,
                "byweekday": [
                    {
                        "weekday": 2
                    }
                ],
                "dtstart": "2023-06-28T14:30:00.000Z",
                "tzid": "Asia/Seoul"
            },
            "options": {
                "freq": 2,
                "dtstart": "2023-06-28T14:30:00.000Z",
                "interval": 1,
                "wkst": 0,
                "count": null,
                "until": null,
                "tzid": "Asia/Seoul",
                "bysetpos": null,
                "bymonth": null,
                "bymonthday": [],
                "bynmonthday": [],
                "byyearday": null,
                "byweekno": null,
                "byweekday": [
                    2
                ],
                "bynweekday": null,
                "byhour": [
                    14
                ],
                "byminute": [
                    30
                ],
                "bysecond": [
                    0
                ],
                "byeaster": null
            }
        }
    ],
    "_rdate": [],
    "_exrule": [],
    "_exdate": [],
    "_dtstart": "2023-06-28T14:30:00.000Z",
    "_tzid": "Asia/Seoul"
}
  • The version of rrule you are using
    2.7.2
  • Your operating system
    macOS
  • Your local timezone (run $ date from the command line
    of the machine showing the bug)
    2023년 6월 21일 수요일 16시 44분 54초 KST
@Sideways-Sky
Copy link

I'm also experiencing this same issue on Windows
Saturday, September 2, 2023 10:08:11 AM

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