{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla-comm/ical.js/issues/148","repository_url":"https://api.github.com/repos/mozilla-comm/ical.js","labels_url":"https://api.github.com/repos/mozilla-comm/ical.js/issues/148/labels{/name}","comments_url":"https://api.github.com/repos/mozilla-comm/ical.js/issues/148/comments","events_url":"https://api.github.com/repos/mozilla-comm/ical.js/issues/148/events","html_url":"https://github.com/mozilla-comm/ical.js/issues/148","id":69576271,"number":148,"title":"Finding occurrences of a recurring event that are after some date","user":{"login":"doganyazar","id":1618686,"avatar_url":"https://avatars2.githubusercontent.com/u/1618686?v=3","gravatar_id":"","url":"https://api.github.com/users/doganyazar","html_url":"https://github.com/doganyazar","followers_url":"https://api.github.com/users/doganyazar/followers","following_url":"https://api.github.com/users/doganyazar/following{/other_user}","gists_url":"https://api.github.com/users/doganyazar/gists{/gist_id}","starred_url":"https://api.github.com/users/doganyazar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doganyazar/subscriptions","organizations_url":"https://api.github.com/users/doganyazar/orgs","repos_url":"https://api.github.com/users/doganyazar/repos","events_url":"https://api.github.com/users/doganyazar/events{/privacy}","received_events_url":"https://api.github.com/users/doganyazar/received_events","type":"User","site_admin":false},"labels":[{"id":215093284,"url":"https://api.github.com/repos/mozilla-comm/ical.js/labels/in%20progress","name":"in progress","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2015-04-20T12:30:24Z","updated_at":"2017-03-30T10:58:30Z","closed_at":null,"body":"I am trying to understand the event API. iterator() gets a start date but then uses that event as the base date-time to generate recurring events and ignores the event's original dtstart. \nI am interested of finding the occurrences that happen after today for example and the only solution I found is to make a loop until it reaches the date-time I am interested in and this is not a neat solution. \n\n```\n  var iter = event.iterator();\n   var next = iter.next();\n\n    for (; next; next = iter.next()) {\n        var occurrence = event.getOccurrenceDetails(next);\n            if (isOccurrenceNow(datetime, occurence)) {\n                return occurrence;\n        }\n    }\n```\n\nAm I missing something?  I think from API point of view, event.iterator(startDate) would be more meaningful if it would the occurrences of the event from this point forward.  \n"},"comment":{"url":"https://api.github.com/repos/mozilla-comm/ical.js/issues/comments/290377215","html_url":"https://github.com/mozilla-comm/ical.js/issues/148#issuecomment-290377215","issue_url":"https://api.github.com/repos/mozilla-comm/ical.js/issues/148","id":290377215,"user":{"login":"mifi","id":402547,"avatar_url":"https://avatars2.githubusercontent.com/u/402547?v=3","gravatar_id":"","url":"https://api.github.com/users/mifi","html_url":"https://github.com/mifi","followers_url":"https://api.github.com/users/mifi/followers","following_url":"https://api.github.com/users/mifi/following{/other_user}","gists_url":"https://api.github.com/users/mifi/gists{/gist_id}","starred_url":"https://api.github.com/users/mifi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mifi/subscriptions","organizations_url":"https://api.github.com/users/mifi/orgs","repos_url":"https://api.github.com/users/mifi/repos","events_url":"https://api.github.com/users/mifi/events{/privacy}","received_events_url":"https://api.github.com/users/mifi/received_events","type":"User","site_admin":false},"created_at":"2017-03-30T10:58:30Z","updated_at":"2017-03-30T10:58:30Z","body":"It started out as a module in a project I have in my company, where I needed a complete ical parser that handles all common cases like recurrence, exdate, exceptions and timezones properly. I spent a lot of time making it work properly, and I decided to pull it out as an npm module and also share it with the world, so others don't need to spend so much time on this too.\r\n\r\nI feel that maybe ical.js is a bit lower level and not so opinionated as ical-expander, also I like to follow the UNIX style of npm modules. Keep them small and separated in concerns.\r\n\r\nBut if the authors of ical.js feel that it is a good fit in ICAL.helpers, we could try to do that. Then we could make an issue to discuss how to integrate it."}}
{"actor":{"display_login":"mifi"}}