rrule
rrule copied to clipboard
Parsing bug in rrulestr function
Reporting an issue
Thank you for taking an interest in rrule
! Please include the following in
your report:
- [x] Verify that you've looked through existing issues for duplicates before creating a new one
- [x] 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,
}
)
- [x] 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.
- [x] 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"
}
- [x] The version of
rrule
you are using 2.7.2 - [x] Your operating system macOS
- [x] Your local timezone (run
$ date
from the command line of the machine showing the bug) 2023년 6월 21일 수요일 16시 44분 54초 KST
I'm also experiencing this same issue on Windows Saturday, September 2, 2023 10:08:11 AM