Created
September 18, 2012 16:46
-
-
Save lightsofapollo/3744221 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Post parser | |
// COMPONENT OR STRING | |
//SAX? | |
var builder = ICAL.Builder({ /* options */ }); | |
builder.onitem = function() { | |
}; | |
builder.oncomlete = function() { | |
}; | |
builder.process(vcalendar); | |
// NEXT ? | |
while((item = builder.next())) { | |
if (item instanceof ICAL.Event) { | |
if (item.isRecurring) { | |
// do stuff | |
item.exceptions; | |
// start/end window, count | |
items.nextOccurances(new Date(2011, 1, 1), new Date(2012, 1, 5), 10); | |
} | |
} | |
} | |
// Some event | |
var component; | |
var event = new ICAL.Event(component); | |
event.DTSTART? | |
event.start? | |
event.endDate? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
builder.next will only return full events (not exceptions). The api may not be obvious here but I don't think we should block the whole iteration if we don't have all the exceptions. After the loop all the exceptions should be present.