pangel-chronic 0.3.0.3 → 0.3.10

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.
Files changed (47) hide show
  1. data/{README.rdoc → README.txt} +7 -22
  2. data/lib/chronic.rb +89 -12
  3. data/lib/chronic/chronic.rb +260 -301
  4. data/lib/chronic/grabber.rb +23 -23
  5. data/lib/chronic/handlers.rb +538 -557
  6. data/lib/chronic/ordinal.rb +36 -35
  7. data/lib/chronic/pointer.rb +24 -26
  8. data/lib/chronic/repeater.rb +128 -138
  9. data/lib/chronic/repeaters/repeater_day.rb +51 -51
  10. data/lib/chronic/repeaters/repeater_day_name.rb +50 -52
  11. data/lib/chronic/repeaters/repeater_day_portion.rb +93 -93
  12. data/lib/chronic/repeaters/repeater_fortnight.rb +66 -66
  13. data/lib/chronic/repeaters/repeater_hour.rb +56 -57
  14. data/lib/chronic/repeaters/repeater_minute.rb +56 -56
  15. data/lib/chronic/repeaters/repeater_month.rb +71 -62
  16. data/lib/chronic/repeaters/repeater_month_name.rb +95 -95
  17. data/lib/chronic/repeaters/repeater_season.rb +142 -142
  18. data/lib/chronic/repeaters/repeater_season_name.rb +42 -42
  19. data/lib/chronic/repeaters/repeater_second.rb +40 -40
  20. data/lib/chronic/repeaters/repeater_time.rb +124 -123
  21. data/lib/chronic/repeaters/repeater_week.rb +70 -70
  22. data/lib/chronic/repeaters/repeater_weekday.rb +76 -76
  23. data/lib/chronic/repeaters/repeater_weekend.rb +63 -63
  24. data/lib/chronic/repeaters/repeater_year.rb +63 -63
  25. data/lib/chronic/scalar.rb +89 -70
  26. data/lib/chronic/separator.rb +88 -88
  27. data/lib/chronic/time_zone.rb +23 -20
  28. data/lib/numerizer/numerizer.rb +93 -94
  29. data/test/suite.rb +2 -2
  30. data/test/test_Chronic.rb +47 -47
  31. data/test/test_Handler.rb +106 -106
  32. data/test/test_Numerizer.rb +47 -49
  33. data/test/test_RepeaterDayName.rb +48 -48
  34. data/test/test_RepeaterFortnight.rb +59 -59
  35. data/test/test_RepeaterHour.rb +61 -64
  36. data/test/test_RepeaterMonth.rb +43 -43
  37. data/test/test_RepeaterMonthName.rb +53 -53
  38. data/test/test_RepeaterTime.rb +68 -68
  39. data/test/test_RepeaterWeek.rb +59 -59
  40. data/test/test_RepeaterWeekday.rb +53 -53
  41. data/test/test_RepeaterWeekend.rb +71 -71
  42. data/test/test_RepeaterYear.rb +59 -59
  43. data/test/test_Span.rb +19 -28
  44. data/test/test_Time.rb +46 -46
  45. data/test/test_Token.rb +22 -22
  46. data/test/test_parsing.rb +726 -792
  47. metadata +6 -10
@@ -2,109 +2,109 @@ require 'chronic'
2
2
  require 'test/unit'
3
3
 
4
4
  class TestHandler < Test::Unit::TestCase
5
-
6
- def setup
7
- # Wed Aug 16 14:00:00 UTC 2006
8
- @now = Time.local(2006, 8, 16, 14, 0, 0, 0)
9
- end
10
-
11
- def test_handler_class_1
12
- handler = Chronic::Handler.new([:repeater], :handler)
13
-
14
- tokens = [Chronic::Token.new('friday')]
15
- tokens[0].tag(Chronic::RepeaterDayName.new(:friday))
16
-
17
- assert handler.match(tokens, Chronic.definitions)
18
-
19
- tokens << Chronic::Token.new('afternoon')
20
- tokens[1].tag(Chronic::RepeaterDayPortion.new(:afternoon))
21
-
22
- assert !handler.match(tokens, Chronic.definitions)
23
- end
24
-
25
- def test_handler_class_2
26
- handler = Chronic::Handler.new([:repeater, :repeater?], :handler)
27
-
28
- tokens = [Chronic::Token.new('friday')]
29
- tokens[0].tag(Chronic::RepeaterDayName.new(:friday))
30
-
31
- assert handler.match(tokens, Chronic.definitions)
32
-
33
- tokens << Chronic::Token.new('afternoon')
34
- tokens[1].tag(Chronic::RepeaterDayPortion.new(:afternoon))
35
-
36
- assert handler.match(tokens, Chronic.definitions)
37
-
38
- tokens << Chronic::Token.new('afternoon')
39
- tokens[2].tag(Chronic::RepeaterDayPortion.new(:afternoon))
40
-
41
- assert !handler.match(tokens, Chronic.definitions)
42
- end
43
-
44
- def test_handler_class_3
45
- handler = Chronic::Handler.new([:repeater, 'time?'], :handler)
46
-
47
- tokens = [Chronic::Token.new('friday')]
48
- tokens[0].tag(Chronic::RepeaterDayName.new(:friday))
49
-
50
- assert handler.match(tokens, Chronic.definitions)
51
-
52
- tokens << Chronic::Token.new('afternoon')
53
- tokens[1].tag(Chronic::RepeaterDayPortion.new(:afternoon))
54
-
55
- assert !handler.match(tokens, Chronic.definitions)
56
- end
57
-
58
- def test_handler_class_4
59
- handler = Chronic::Handler.new([:repeater_month_name, :scalar_day, 'time?'], :handler)
60
-
61
- tokens = [Chronic::Token.new('may')]
62
- tokens[0].tag(Chronic::RepeaterMonthName.new(:may))
63
-
64
- assert !handler.match(tokens, Chronic.definitions)
65
-
66
- tokens << Chronic::Token.new('27')
67
- tokens[1].tag(Chronic::ScalarDay.new(27))
68
-
69
- assert handler.match(tokens, Chronic.definitions)
70
- end
71
-
72
- def test_handler_class_5
73
- handler = Chronic::Handler.new([:repeater, 'time?'], :handler)
74
-
75
- tokens = [Chronic::Token.new('friday')]
76
- tokens[0].tag(Chronic::RepeaterDayName.new(:friday))
77
-
78
- assert handler.match(tokens, Chronic.definitions)
79
-
80
- tokens << Chronic::Token.new('5:00')
81
- tokens[1].tag(Chronic::RepeaterTime.new('5:00'))
82
-
83
- assert handler.match(tokens, Chronic.definitions)
84
-
85
- tokens << Chronic::Token.new('pm')
86
- tokens[2].tag(Chronic::RepeaterDayPortion.new(:pm))
87
-
88
- assert handler.match(tokens, Chronic.definitions)
89
- end
90
-
91
- def test_handler_class_6
92
- handler = Chronic::Handler.new([:scalar, :repeater, :pointer], :handler)
93
-
94
- tokens = [Chronic::Token.new('3'),
95
- Chronic::Token.new('years'),
96
- Chronic::Token.new('past')]
97
-
98
- tokens[0].tag(Chronic::Scalar.new(3))
99
- tokens[1].tag(Chronic::RepeaterYear.new(:year))
100
- tokens[2].tag(Chronic::Pointer.new(:past))
101
-
102
- assert handler.match(tokens, Chronic.definitions)
103
- end
104
-
105
- def test_constantize
106
- handler = Chronic::Handler.new([], :handler)
107
- assert_equal Chronic::RepeaterTime, handler.constantize(:repeater_time)
108
- end
109
-
110
- end
5
+
6
+ def setup
7
+ # Wed Aug 16 14:00:00 UTC 2006
8
+ @now = Time.local(2006, 8, 16, 14, 0, 0, 0)
9
+ end
10
+
11
+ def test_handler_class_1
12
+ handler = Chronic::Handler.new([:repeater], :handler)
13
+
14
+ tokens = [Chronic::Token.new('friday')]
15
+ tokens[0].tag(Chronic::RepeaterDayName.new(:friday))
16
+
17
+ assert handler.match(tokens, Chronic.definitions)
18
+
19
+ tokens << Chronic::Token.new('afternoon')
20
+ tokens[1].tag(Chronic::RepeaterDayPortion.new(:afternoon))
21
+
22
+ assert !handler.match(tokens, Chronic.definitions)
23
+ end
24
+
25
+ def test_handler_class_2
26
+ handler = Chronic::Handler.new([:repeater, :repeater?], :handler)
27
+
28
+ tokens = [Chronic::Token.new('friday')]
29
+ tokens[0].tag(Chronic::RepeaterDayName.new(:friday))
30
+
31
+ assert handler.match(tokens, Chronic.definitions)
32
+
33
+ tokens << Chronic::Token.new('afternoon')
34
+ tokens[1].tag(Chronic::RepeaterDayPortion.new(:afternoon))
35
+
36
+ assert handler.match(tokens, Chronic.definitions)
37
+
38
+ tokens << Chronic::Token.new('afternoon')
39
+ tokens[2].tag(Chronic::RepeaterDayPortion.new(:afternoon))
40
+
41
+ assert !handler.match(tokens, Chronic.definitions)
42
+ end
43
+
44
+ def test_handler_class_3
45
+ handler = Chronic::Handler.new([:repeater, 'time?'], :handler)
46
+
47
+ tokens = [Chronic::Token.new('friday')]
48
+ tokens[0].tag(Chronic::RepeaterDayName.new(:friday))
49
+
50
+ assert handler.match(tokens, Chronic.definitions)
51
+
52
+ tokens << Chronic::Token.new('afternoon')
53
+ tokens[1].tag(Chronic::RepeaterDayPortion.new(:afternoon))
54
+
55
+ assert !handler.match(tokens, Chronic.definitions)
56
+ end
57
+
58
+ def test_handler_class_4
59
+ handler = Chronic::Handler.new([:repeater_month_name, :scalar_day, 'time?'], :handler)
60
+
61
+ tokens = [Chronic::Token.new('may')]
62
+ tokens[0].tag(Chronic::RepeaterMonthName.new(:may))
63
+
64
+ assert !handler.match(tokens, Chronic.definitions)
65
+
66
+ tokens << Chronic::Token.new('27')
67
+ tokens[1].tag(Chronic::ScalarDay.new(27))
68
+
69
+ assert handler.match(tokens, Chronic.definitions)
70
+ end
71
+
72
+ def test_handler_class_5
73
+ handler = Chronic::Handler.new([:repeater, 'time?'], :handler)
74
+
75
+ tokens = [Chronic::Token.new('friday')]
76
+ tokens[0].tag(Chronic::RepeaterDayName.new(:friday))
77
+
78
+ assert handler.match(tokens, Chronic.definitions)
79
+
80
+ tokens << Chronic::Token.new('5:00')
81
+ tokens[1].tag(Chronic::RepeaterTime.new('5:00'))
82
+
83
+ assert handler.match(tokens, Chronic.definitions)
84
+
85
+ tokens << Chronic::Token.new('pm')
86
+ tokens[2].tag(Chronic::RepeaterDayPortion.new(:pm))
87
+
88
+ assert handler.match(tokens, Chronic.definitions)
89
+ end
90
+
91
+ def test_handler_class_6
92
+ handler = Chronic::Handler.new([:scalar, :repeater, :pointer], :handler)
93
+
94
+ tokens = [Chronic::Token.new('3'),
95
+ Chronic::Token.new('years'),
96
+ Chronic::Token.new('past')]
97
+
98
+ tokens[0].tag(Chronic::Scalar.new(3))
99
+ tokens[1].tag(Chronic::RepeaterYear.new(:year))
100
+ tokens[2].tag(Chronic::Pointer.new(:past))
101
+
102
+ assert handler.match(tokens, Chronic.definitions)
103
+ end
104
+
105
+ def test_constantize
106
+ handler = Chronic::Handler.new([], :handler)
107
+ assert_equal Chronic::RepeaterTime, handler.constantize(:repeater_time)
108
+ end
109
+
110
+ end
@@ -3,52 +3,50 @@ require 'chronic'
3
3
 
4
4
  class ParseNumbersTest < Test::Unit::TestCase
5
5
 
6
- def test_straight_parsing
7
- strings = { 1 => 'one',
8
- 5 => 'five',
9
- 10 => 'ten',
10
- 11 => 'eleven',
11
- 12 => 'twelve',
12
- 13 => 'thirteen',
13
- 14 => 'fourteen',
14
- 15 => 'fifteen',
15
- 16 => 'sixteen',
16
- 17 => 'seventeen',
17
- 18 => 'eighteen',
18
- 19 => 'nineteen',
19
- 20 => 'twenty',
20
- 27 => 'twenty seven',
21
- 31 => 'thirty-one',
22
- 41 => 'forty one',
23
- 42 => 'fourty two',
24
- 59 => 'fifty nine',
25
- 100 => 'a hundred',
26
- 100 => 'one hundred',
27
- 150 => 'one hundred and fifty',
28
- # 150 => 'one fifty',
29
- 200 => 'two-hundred',
30
- 500 => '5 hundred',
31
- 999 => 'nine hundred and ninety nine',
32
- 1_000 => 'one thousand',
33
- 1_200 => 'twelve hundred',
34
- 1_200 => 'one thousand two hundred',
35
- 17_000 => 'seventeen thousand',
36
- 21_473 => 'twentyone-thousand-four-hundred-and-seventy-three',
37
- 74_002 => 'seventy four thousand and two',
38
- 99_999 => 'ninety nine thousand nine hundred ninety nine',
39
- 100_000 => '100 thousand',
40
- 250_000 => 'two hundred fifty thousand',
41
- 1_000_000 => 'one million',
42
- 1_250_007 => 'one million two hundred fifty thousand and seven',
43
- 1_000_000_000 => 'one billion',
44
- 1_000_000_001 => 'one billion and one' }
45
-
46
- strings.keys.sort.each do |key|
47
- assert_equal key, Numerizer.numerize(strings[key]).to_i
48
- end
49
- end
50
-
51
- def test_edges
52
- assert_equal "27 Oct 2006 7:30am", Numerizer.numerize("27 Oct 2006 7:30am")
53
- end
54
- end
6
+ def test_straight_parsing
7
+ strings = { 1 => 'one',
8
+ 5 => 'five',
9
+ 10 => 'ten',
10
+ 11 => 'eleven',
11
+ 12 => 'twelve',
12
+ 13 => 'thirteen',
13
+ 14 => 'fourteen',
14
+ 15 => 'fifteen',
15
+ 16 => 'sixteen',
16
+ 17 => 'seventeen',
17
+ 18 => 'eighteen',
18
+ 19 => 'nineteen',
19
+ 20 => 'twenty',
20
+ 27 => 'twenty seven',
21
+ 31 => 'thirty-one',
22
+ 59 => 'fifty nine',
23
+ 100 => 'a hundred',
24
+ 100 => 'one hundred',
25
+ 150 => 'one hundred and fifty',
26
+ # 150 => 'one fifty',
27
+ 200 => 'two-hundred',
28
+ 500 => '5 hundred',
29
+ 999 => 'nine hundred and ninety nine',
30
+ 1_000 => 'one thousand',
31
+ 1_200 => 'twelve hundred',
32
+ 1_200 => 'one thousand two hundred',
33
+ 17_000 => 'seventeen thousand',
34
+ 21_473 => 'twentyone-thousand-four-hundred-and-seventy-three',
35
+ 74_002 => 'seventy four thousand and two',
36
+ 99_999 => 'ninety nine thousand nine hundred ninety nine',
37
+ 100_000 => '100 thousand',
38
+ 250_000 => 'two hundred fifty thousand',
39
+ 1_000_000 => 'one million',
40
+ 1_250_007 => 'one million two hundred fifty thousand and seven',
41
+ 1_000_000_000 => 'one billion',
42
+ 1_000_000_001 => 'one billion and one' }
43
+
44
+ strings.keys.sort.each do |key|
45
+ assert_equal key, Numerizer.numerize(strings[key]).to_i
46
+ end
47
+ end
48
+
49
+ def test_edges
50
+ assert_equal "27 Oct 2006 7:30am", Numerizer.numerize("27 Oct 2006 7:30am")
51
+ end
52
+ end
@@ -2,51 +2,51 @@ require 'chronic'
2
2
  require 'test/unit'
3
3
 
4
4
  class TestRepeaterDayName < Test::Unit::TestCase
5
-
6
- def setup
7
- @now = Time.local(2006, 8, 16, 14, 0, 0, 0)
8
- end
9
-
10
- def test_match
11
- token = Chronic::Token.new('saturday')
12
- repeater = Chronic::Repeater.scan_for_day_names(token)
13
- assert_equal Chronic::RepeaterDayName, repeater.class
14
- assert_equal :saturday, repeater.type
15
-
16
- token = Chronic::Token.new('sunday')
17
- repeater = Chronic::Repeater.scan_for_day_names(token)
18
- assert_equal Chronic::RepeaterDayName, repeater.class
19
- assert_equal :sunday, repeater.type
20
- end
21
-
22
- def test_next_future
23
- mondays = Chronic::RepeaterDayName.new(:monday)
24
- mondays.start = @now
25
-
26
- span = mondays.next(:future)
27
-
28
- assert_equal Time.local(2006, 8, 21), span.begin
29
- assert_equal Time.local(2006, 8, 22), span.end
30
-
31
- span = mondays.next(:future)
32
-
33
- assert_equal Time.local(2006, 8, 28), span.begin
34
- assert_equal Time.local(2006, 8, 29), span.end
35
- end
36
-
37
- def test_next_past
38
- mondays = Chronic::RepeaterDayName.new(:monday)
39
- mondays.start = @now
40
-
41
- span = mondays.next(:past)
42
-
43
- assert_equal Time.local(2006, 8, 14), span.begin
44
- assert_equal Time.local(2006, 8, 15), span.end
45
-
46
- span = mondays.next(:past)
47
-
48
- assert_equal Time.local(2006, 8, 7), span.begin
49
- assert_equal Time.local(2006, 8, 8), span.end
50
- end
51
-
52
- end
5
+
6
+ def setup
7
+ @now = Time.local(2006, 8, 16, 14, 0, 0, 0)
8
+ end
9
+
10
+ def test_match
11
+ token = Chronic::Token.new('saturday')
12
+ repeater = Chronic::Repeater.scan_for_day_names(token)
13
+ assert_equal Chronic::RepeaterDayName, repeater.class
14
+ assert_equal :saturday, repeater.type
15
+
16
+ token = Chronic::Token.new('sunday')
17
+ repeater = Chronic::Repeater.scan_for_day_names(token)
18
+ assert_equal Chronic::RepeaterDayName, repeater.class
19
+ assert_equal :sunday, repeater.type
20
+ end
21
+
22
+ def test_next_future
23
+ mondays = Chronic::RepeaterDayName.new(:monday)
24
+ mondays.start = @now
25
+
26
+ span = mondays.next(:future)
27
+
28
+ assert_equal Time.local(2006, 8, 21), span.begin
29
+ assert_equal Time.local(2006, 8, 22), span.end
30
+
31
+ span = mondays.next(:future)
32
+
33
+ assert_equal Time.local(2006, 8, 28), span.begin
34
+ assert_equal Time.local(2006, 8, 29), span.end
35
+ end
36
+
37
+ def test_next_past
38
+ mondays = Chronic::RepeaterDayName.new(:monday)
39
+ mondays.start = @now
40
+
41
+ span = mondays.next(:past)
42
+
43
+ assert_equal Time.local(2006, 8, 14), span.begin
44
+ assert_equal Time.local(2006, 8, 15), span.end
45
+
46
+ span = mondays.next(:past)
47
+
48
+ assert_equal Time.local(2006, 8, 7), span.begin
49
+ assert_equal Time.local(2006, 8, 8), span.end
50
+ end
51
+
52
+ end
@@ -2,62 +2,62 @@ require 'chronic'
2
2
  require 'test/unit'
3
3
 
4
4
  class TestRepeaterFortnight < Test::Unit::TestCase
5
-
6
- def setup
7
- @now = Time.local(2006, 8, 16, 14, 0, 0, 0)
8
- end
9
-
10
- def test_next_future
11
- fortnights = Chronic::RepeaterFortnight.new(:fortnight)
12
- fortnights.start = @now
13
-
14
- next_fortnight = fortnights.next(:future)
15
- assert_equal Time.local(2006, 8, 20), next_fortnight.begin
16
- assert_equal Time.local(2006, 9, 3), next_fortnight.end
17
-
18
- next_next_fortnight = fortnights.next(:future)
19
- assert_equal Time.local(2006, 9, 3), next_next_fortnight.begin
20
- assert_equal Time.local(2006, 9, 17), next_next_fortnight.end
21
- end
22
-
23
- def test_next_past
24
- fortnights = Chronic::RepeaterFortnight.new(:fortnight)
25
- fortnights.start = @now
26
-
27
- last_fortnight = fortnights.next(:past)
28
- assert_equal Time.local(2006, 7, 30), last_fortnight.begin
29
- assert_equal Time.local(2006, 8, 13), last_fortnight.end
30
-
31
- last_last_fortnight = fortnights.next(:past)
32
- assert_equal Time.local(2006, 7, 16), last_last_fortnight.begin
33
- assert_equal Time.local(2006, 7, 30), last_last_fortnight.end
34
- end
35
-
36
- def test_this_future
37
- fortnights = Chronic::RepeaterFortnight.new(:fortnight)
38
- fortnights.start = @now
39
-
40
- this_fortnight = fortnights.this(:future)
41
- assert_equal Time.local(2006, 8, 16, 15), this_fortnight.begin
42
- assert_equal Time.local(2006, 8, 27), this_fortnight.end
43
- end
44
-
45
- def test_this_past
46
- fortnights = Chronic::RepeaterFortnight.new(:fortnight)
47
- fortnights.start = @now
48
-
49
- this_fortnight = fortnights.this(:past)
50
- assert_equal Time.local(2006, 8, 13, 0), this_fortnight.begin
51
- assert_equal Time.local(2006, 8, 16, 14), this_fortnight.end
52
- end
53
-
54
- def test_offset
55
- span = Chronic::Span.new(@now, @now + 1)
56
-
57
- offset_span = Chronic::RepeaterFortnight.new(:week).offset(span, 3, :future)
58
-
59
- assert_equal Time.local(2006, 9, 27, 14), offset_span.begin
60
- assert_equal Time.local(2006, 9, 27, 14, 0, 1), offset_span.end
61
- end
62
-
63
- end
5
+
6
+ def setup
7
+ @now = Time.local(2006, 8, 16, 14, 0, 0, 0)
8
+ end
9
+
10
+ def test_next_future
11
+ fortnights = Chronic::RepeaterFortnight.new(:fortnight)
12
+ fortnights.start = @now
13
+
14
+ next_fortnight = fortnights.next(:future)
15
+ assert_equal Time.local(2006, 8, 20), next_fortnight.begin
16
+ assert_equal Time.local(2006, 9, 3), next_fortnight.end
17
+
18
+ next_next_fortnight = fortnights.next(:future)
19
+ assert_equal Time.local(2006, 9, 3), next_next_fortnight.begin
20
+ assert_equal Time.local(2006, 9, 17), next_next_fortnight.end
21
+ end
22
+
23
+ def test_next_past
24
+ fortnights = Chronic::RepeaterFortnight.new(:fortnight)
25
+ fortnights.start = @now
26
+
27
+ last_fortnight = fortnights.next(:past)
28
+ assert_equal Time.local(2006, 7, 30), last_fortnight.begin
29
+ assert_equal Time.local(2006, 8, 13), last_fortnight.end
30
+
31
+ last_last_fortnight = fortnights.next(:past)
32
+ assert_equal Time.local(2006, 7, 16), last_last_fortnight.begin
33
+ assert_equal Time.local(2006, 7, 30), last_last_fortnight.end
34
+ end
35
+
36
+ def test_this_future
37
+ fortnights = Chronic::RepeaterFortnight.new(:fortnight)
38
+ fortnights.start = @now
39
+
40
+ this_fortnight = fortnights.this(:future)
41
+ assert_equal Time.local(2006, 8, 16, 15), this_fortnight.begin
42
+ assert_equal Time.local(2006, 8, 27), this_fortnight.end
43
+ end
44
+
45
+ def test_this_past
46
+ fortnights = Chronic::RepeaterFortnight.new(:fortnight)
47
+ fortnights.start = @now
48
+
49
+ this_fortnight = fortnights.this(:past)
50
+ assert_equal Time.local(2006, 8, 13, 0), this_fortnight.begin
51
+ assert_equal Time.local(2006, 8, 16, 14), this_fortnight.end
52
+ end
53
+
54
+ def test_offset
55
+ span = Chronic::Span.new(@now, @now + 1)
56
+
57
+ offset_span = Chronic::RepeaterWeek.new(:week).offset(span, 3, :future)
58
+
59
+ assert_equal Time.local(2006, 9, 6, 14), offset_span.begin
60
+ assert_equal Time.local(2006, 9, 6, 14, 0, 1), offset_span.end
61
+ end
62
+
63
+ end