You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const testRrule = new RRule({
"freq": 1,
"count": 20,
"bymonth": [3, 4, 5, 6],
"dtstart": new Date("2025-02-17T23:00:00.000Z"),
"interval": 1,
"byweekday": ["MO", "TU", "WE"]
})
testRrule.options
/**
You get:
{
...,
"byweekday":[0,1,2,],
...
}
*/
testRrule.toString()
/**
You get:
'DTSTART:20250217T230000Z\nRRULE:FREQ=MONTHLY;COUNT=20;BYMONTH=3,4,5,6;INTERVAL=1;BYDAY=undefined,undefined,undefined'
*/
I presume if options are proper after initializing rrule object with WeekdayStr (2 character strings) and converted to number, then toString() method might not be implemented properly for byweekday conversion to BYDAY.
If I initialized rrule.byweekday with numbers, it'll return allright in both cases. Example:
const testRrule = new RRule({
"freq": 1,
"count": 20,
"bymonth": [3, 4, 5, 6],
"dtstart": new Date("2025-02-17T23:00:00.000Z"),
"interval": 1,
"byweekday": [0,1,2]
})
testRrule.options
/**
You get:
{
...,
"byweekday":[0,1,2,],
...
}
*/
testRrule.toString()
/**
You get:
'DTSTART:20250217T230000Z\nRRULE:FREQ=MONTHLY;COUNT=20;BYMONTH=3,4,5,6;INTERVAL=1;BYDAY=BYDAY=MO,TU,WE'
*/
The text was updated successfully, but these errors were encountered:
vedranbasic
changed the title
Invalid byweekday conversion to string when given in string ("MO", "TU") format
Invalid byweekday conversion to string when initializing rrule with WeekdayStr ("MO", "TU") format
Feb 18, 2025
Example:
I presume if options are proper after initializing rrule object with WeekdayStr (2 character strings) and converted to number, then toString() method might not be implemented properly for byweekday conversion to BYDAY.
If I initialized rrule.byweekday with numbers, it'll return allright in both cases. Example:
The text was updated successfully, but these errors were encountered: