README.md in icalendar-recurrence-1.1.3 vs README.md in icalendar-recurrence-1.2.0
- old
+ new
@@ -18,15 +18,19 @@
```ruby
require 'date' # for parse method
require 'icalendar/recurrence'
-calendars = Icalendar.parse(File.read(path_to_ics)) # parse an ICS file
+calendars = Icalendar::Calendar.parse(File.read(path_to_ics)) # parse an ICS file
event = Array(calendars).first.events.first # retrieve the first event
event.occurrences_between(Date.parse("2014-01-01"), Date.parse("2014-02-01")) # get all occurrence for one month
```
+### Get all occurrences
+
+To get all occurrences you can use `all_occurrences`. This only works when you have specified an ending using `until` or `count` in your RRULE.
+
### Working with occurrences
An event occurrence is a simple struct object with `start_time` and `end_time` methods.
```ruby
@@ -65,10 +69,10 @@
END:VCALENDAR
EOF
# An event that occurs every day, starting January 1, 2014 with one excluded
# date. January 28, 2014 will not appear in the occurrences.
-calendars = Icalendar.parse(ics_string)
+calendars = Icalendar::Calendar.parse(ics_string)
every_day_except_jan_28 = Array(calendars).first.events.first
puts "Every day except January 28, 2014, occurrences from 2014-01-01 to 2014-02-01:"
puts every_day_except_jan_28.occurrences_between(Date.parse("2014-01-01"), Date.parse("2014-02-01"))
```