jruby-rfc2445 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/recurrence_time.rb +2 -0
- data/lib/rfc2445.jar +0 -0
- data/spec/rfc2445_spec.rb +11 -0
- metadata +1 -1
data/lib/recurrence_time.rb
CHANGED
@@ -22,6 +22,8 @@ class RecurrenceTime
|
|
22
22
|
rdata = rdata.to_ical if (rdata.kind_of? RRule or
|
23
23
|
rdata.kind_of? RDateList)
|
24
24
|
rdata = (rdata.map {|r| r.to_ical}).join("\n") if rdata.kind_of? Array
|
25
|
+
# Filter out empty EXDATE because Google Calendar returns empty EXDATE
|
26
|
+
rdata.gsub!(/EXDATE.*?:\s*$/, '')
|
25
27
|
@iterator = DateTimeIteratorFactory.createDateTimeIterator(rdata,
|
26
28
|
start_time.to_java,
|
27
29
|
start_time.java_zone,
|
data/lib/rfc2445.jar
CHANGED
Binary file
|
data/spec/rfc2445_spec.rb
CHANGED
@@ -486,6 +486,17 @@ describe RecurrenceTime do
|
|
486
486
|
first_next.year.should == 2001
|
487
487
|
end
|
488
488
|
|
489
|
+
it "should be initialized by RRule and empty EXDate" do
|
490
|
+
rtime = RecurrenceTime.new("RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=SA;BYSETPOS=1\nEXDATE;VALUE=DATE-TIME;TZID=America/Los_Angeles:",
|
491
|
+
@start_date)
|
492
|
+
rtime.should be_instance_of(RecurrenceTime)
|
493
|
+
rtime.next
|
494
|
+
first_next = rtime.next
|
495
|
+
first_next.mon.should == 5
|
496
|
+
first_next.day.should == 5
|
497
|
+
first_next.year.should == 2001
|
498
|
+
end
|
499
|
+
|
489
500
|
it "should able to generate a JTime by invoking next" do
|
490
501
|
nexttime = @rtime.next
|
491
502
|
nexttime.should be_instance_of(JTime)
|