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
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.
Expected output
Actual output
The version of rrule you are using
Your operating system
Your local timezone (run $ date from the command line
of the machine showing the bug)
Code reproduction:
const rrule = require('rrule');
console.log(rrule.rrulestr(new rrule.RRule({ dtstart: new Date("0010-01-01T00:00:00Z") }).toString()));
Expected: any RRule object Actual: error is thrown:
Uncaught Error: Invalid UNTIL value: 00,20101T000000Z
at untilStringToDate (/Users/jamesfulford/solomon-app/node_modules/rrule/dist/es5/rrule.js:370:15)
at parseDtstart (/Users/jamesfulford/solomon-app/node_modules/rrule/dist/es5/rrule.js:2165:23)
at parseInput (/Users/jamesfulford/solomon-app/node_modules/rrule/dist/es5/rrule.js:3429:25)
at buildRule (/Users/jamesfulford/solomon-app/node_modules/rrule/dist/es5/rrule.js:3477:14)
at Module.rrulestr (/Users/jamesfulford/solomon-app/node_modules/rrule/dist/es5/rrule.js:3512:12)
It seems that for single-digit year dtstart dates, rrule throws exceptions.
This matters because my app displays a preview of dates while the user is editing the dtstart, and "0002-01-01" is common when the user selects the year and starts typing in the year field (using the build-in <input type="date" /> selector). (Funnily enough, this was a user-discovered bug!) I'm able to fix it in my app by handling when the rrule string generated is invalid, but the library should be producing a valid rrule string in this scenario.
Reporting an issue
Thank you for taking an interest in
rrule
! Please include the following inyour report:
creating a new one
are using such as the exact RRule string and dates.
rrule
you are using$ date
from the command lineof the machine showing the bug)
Code reproduction:
Expected: any RRule object
Actual: error is thrown:
It seems that for single-digit year dtstart dates, rrule throws exceptions.
This matters because my app displays a preview of dates while the user is editing the dtstart, and "0002-01-01" is common when the user selects the year and starts typing in the year field (using the build-in
<input type="date" />
selector). (Funnily enough, this was a user-discovered bug!) I'm able to fix it in my app by handling when the rrule string generated is invalid, but the library should be producing a valid rrule string in this scenario.Operating system: MacOS Ventura 13.6.3
Node version: v18.19.0
rrule package version: 2.8.1
Timezone:
The text was updated successfully, but these errors were encountered: