ice_cube 0.6.7 → 0.6.8

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.
@@ -138,8 +138,8 @@ module IceCube
138
138
  representation
139
139
  end
140
140
 
141
- #TODO - until date formatting is not iCalendar here
142
- #get the icalendar representation of this rule logic
141
+ # get the icalendar representation of this rule logic
142
+ # Note: UNTIL dates are always in UTC as per iCalendar
143
143
  def to_ical_base
144
144
  representation = ''
145
145
  representation << ";INTERVAL=#{@interval}" if @interval > 1
@@ -147,7 +147,7 @@ module IceCube
147
147
  representation << ';' << v.send(:to_ical)
148
148
  end
149
149
  representation << ";COUNT=#{@occurrence_count}" if @occurrence_count
150
- representation << ";UNTIL=#{@until_date}" if @until_date
150
+ representation << ";UNTIL=#{TimeUtil.ical_utc_format(@until_date)}" if @until_date
151
151
  representation
152
152
  end
153
153
 
@@ -72,6 +72,11 @@ module IceCube
72
72
  is_leap?(date.year) ? LeapYearMonthDays[date.month - 1] : CommonYearMonthDays[date.month - 1]
73
73
  end
74
74
 
75
+ def self.ical_utc_format(time)
76
+ time = time.dup.utc
77
+ "#{time.strftime('%Y%m%dT%H%M%SZ')}" # utc time
78
+ end
79
+
75
80
  def self.ical_format(time, force_utc)
76
81
  time = time.dup.utc if force_utc
77
82
  if time.utc?
@@ -1,5 +1,5 @@
1
1
  module IceCube
2
2
 
3
- VERSION = '0.6.7'
3
+ VERSION = '0.6.8'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ice_cube
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
5
4
  prerelease:
6
- segments:
7
- - 0
8
- - 6
9
- - 7
10
- version: 0.6.7
5
+ version: 0.6.8
11
6
  platform: ruby
12
7
  authors:
13
8
  - John Crepezzi
@@ -15,7 +10,7 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2011-04-22 00:00:00 -04:00
13
+ date: 2011-05-10 00:00:00 -04:00
19
14
  default_executable:
20
15
  dependencies:
21
16
  - !ruby/object:Gem::Dependency
@@ -26,9 +21,6 @@ dependencies:
26
21
  requirements:
27
22
  - - ">="
28
23
  - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
24
  version: "0"
33
25
  type: :development
34
26
  version_requirements: *id001
@@ -78,23 +70,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
78
70
  requirements:
79
71
  - - ">="
80
72
  - !ruby/object:Gem::Version
81
- hash: 3
82
- segments:
83
- - 0
84
73
  version: "0"
85
74
  required_rubygems_version: !ruby/object:Gem::Requirement
86
75
  none: false
87
76
  requirements:
88
77
  - - ">="
89
78
  - !ruby/object:Gem::Version
90
- hash: 3
91
- segments:
92
- - 0
93
79
  version: "0"
94
80
  requirements: []
95
81
 
96
82
  rubyforge_project: ice-cube
97
- rubygems_version: 1.4.1
83
+ rubygems_version: 1.6.2
98
84
  signing_key:
99
85
  specification_version: 3
100
86
  summary: Ruby Date Recurrence Library