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
Make parser more lenient for date-time values (invalid date-time value: "2015-08-12T::") #186
Comments
The parser is pretty strict about values, I haven't yet looked into a good way to control how strict it should be. The problem is that the |
It would be nice, if the parser could be more flexible. |
change in ical.js line 5587
|
I just ran into the same. Ended up doing a traversal of the jCal before instantiating components: function fixUpJcal(jCal) {
jCal[1].forEach(function (property) {
if (property[0] === 'dtstart' || property[0] === 'dtend' || property[0] === 'exdate' || property[0] === 'rdate') {
if (!property[1].value && property[2] === 'date-time' && /T::$/.test(property[3])) {
property[2] = 'date';
property[3] = property[3].replace(/T::$/, '');
}
}
});
jCal[2].forEach(fixUpJcal);
return jCal;
} |
I'm working on a new patch that will make DATE, DATE-TIME, and PERIOD values more lenient when setting a specific flag for the parser. I'm pretty far through, just need to do some clean up, make sure I'm happy with the level of leniency, and check if there are other properties that might need similar treatment. |
… "2019-11-12T::"
I get the Error
Uncaught Error: invalid date-time value: "2015-08-12T::"
in line
the ical file:
Outlook read this file as an all day event from 12.08.2015 to 14.08.2015.
The text was updated successfully, but these errors were encountered: