Comments (7)
Failing test case here : https://github.com/LionelMartin/ical.js/commit/a32a747900dddba64d65f46e8591521de62bfbaf#test
from ical.js.
Same problem here.
(LionelMartin: thanks for the hack)
from ical.js.
I believe this was fixed by #48 - can you run your test and confirm?
I'd love to add the test to the suite if this solves it.
from ical.js.
I also stumbled across this one and made some changes, which work for me. From my point of view this is still a hack, as I don't like the changes I've made in ical.js/addTZ(..). Maybe somebody has a better idea, how to implement it.
The main problem I found, was that you can't depend on the position of the "DTSTART" if this comes before the "RRULE" then the #48 might work, but I had problems with it as the fix will not update the already created a "BYMOUNTH" and "BYDATE" in the rrule cache.
On the other hand if "DTSTART" follows RRULE #48 might never work, so the same fix done in "RRULE" handling needs also be done when DTSTART is parsed.
As said previously I consider this quite a hack, but as this problem is around nearly a year I though sharing might be helpful. If required/wanted I can created a pull request, but the code might need some additional testing.
from ical.js.
I ran across this problem also. The fix for #48 does not completely fix #21 - in that ev.rrule.between() does not seem to work properly... even though rrule.options.dtstart seems to be set, it's not being honored. (Perhaps ev.rrule.origOptions is being used instead?)
I independently developed my own fix, which is shown below. This code fixes the problems that I was experiencing, but potentially suffers the same deficiency that @Angus71 noted, namely that if "DTSTART" comes after the "RRULE", then it should not work. (and if RRULE includes a DTSTART field it will be overwritten, although this is easily fixed.)
ical.objectHandlers['RRULE'] = function(val, params, curr, stack, line){
var rule = line.replace("RRULE:", "");
rule += ";DTSTART="+curr.start.toISOString().replace(/[-:]/g,'');
rule = rule.replace(/\.[0-9]{3}/, "");
curr['rrule'] = rrule.fromString(rule);
return curr
}
from ical.js.
The DTSTART/RRULE sequencing issue noted by @Angus71 (and later me) should probably be fixed by moving the code that patches up the RRULE with a default start date into the objectHandler for 'END'. I'll try this tonight.
from ical.js.
@risacher Any luck fixing this?
from ical.js.
Related Issues (20)
- Please consider republishing to npm HOT 2
- length is not defined exception when parsing
- camelCase rrule options
- 403: Forbidden For Airbnb iCal HOT 3
- No way to tell if an event is an all day event HOT 1
- Refactor ical, relocating parsing code into new module suitable for non-Node.js environments HOT 3
- if calendar data has linux line ends, parseICS doesn't parse data
- Recurring events created in DST are off by an hour after DST HOT 8
- Replace `request` lib with native http fetch or something lightweight HOT 4
- error parsing blank RRULE line
- Support ECMAScript module HOT 1
- want to add tests for fixing microsoft timezones, and timezones in general, but existing tests fail on test5 and test8
- windows timezones are not supported
- Automated dependency updates HOT 1
- Create new npm release after bump of rrule HOT 1
- Recurrences is declared as an array and used as an object
- Recurring exdates not picked up by parser. HOT 3
- Daylight saving not managed properly
- TypeError: self.getLineBreakChar is not a function HOT 1
- Incorrect parsing of quoted-value
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ical.js.