lazier 3.5.6 → 3.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/doc/Lazier.html +1 -1
- data/doc/Lazier/Boolean.html +1 -1
- data/doc/Lazier/Configuration.html +1 -1
- data/doc/Lazier/DateTime.html +1 -1
- data/doc/Lazier/DateTime/ClassMethods.html +1 -1
- data/doc/Lazier/Exceptions.html +1 -1
- data/doc/Lazier/Exceptions/Debug.html +1 -1
- data/doc/Lazier/Exceptions/MissingTranslation.html +1 -1
- data/doc/Lazier/Hash.html +1 -1
- data/doc/Lazier/I18n.html +1 -1
- data/doc/Lazier/Localizer.html +1 -1
- data/doc/Lazier/Math.html +1 -1
- data/doc/Lazier/Math/ClassMethods.html +1 -1
- data/doc/Lazier/Object.html +1 -1
- data/doc/Lazier/Pathname.html +1 -1
- data/doc/Lazier/Settings.html +1 -1
- data/doc/Lazier/String.html +1 -1
- data/doc/Lazier/TimeZone.html +64 -64
- data/doc/Lazier/TimeZone/ClassMethods.html +29 -23
- data/doc/Lazier/Version.html +2 -2
- data/doc/_index.html +1 -1
- data/doc/file.README.html +1 -1
- data/doc/index.html +1 -1
- data/doc/top-level-namespace.html +1 -1
- data/lib/lazier/timezone.rb +5 -2
- data/lib/lazier/version.rb +1 -1
- data/spec/lazier/timezone_spec.rb +4 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 526a940e41a2ae89dbf519deba9b2d1ec0520fe2
|
4
|
+
data.tar.gz: 167c02d06befab0cf24b45250f6b08f87777abdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1433dc8c70b00d74cf34c6b2bfb04327fdbe0e4c1b0ceb967bd7c35a55f0c0f693c24caf3e0bec5e73720a09f6c49cdda64a92379303318470893e0e7185669b
|
7
|
+
data.tar.gz: 13d1822c36d4a00648e27a32baa86727d3226a4fa488a2f2e26bb411126b312ab4f29a4c9b975415ad2d7342f5a581de071d224bff6517d6ec9455e3a5148071
|
data/CHANGELOG.md
CHANGED
data/doc/Lazier.html
CHANGED
@@ -1154,7 +1154,7 @@ Otherwise the class of the object will returned.</p>
|
|
1154
1154
|
</div>
|
1155
1155
|
|
1156
1156
|
<div id="footer">
|
1157
|
-
Generated on Thu Jun 19 11:
|
1157
|
+
Generated on Thu Jun 19 11:49:04 2014 by
|
1158
1158
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1159
1159
|
0.8.7.4 (ruby-2.1.2).
|
1160
1160
|
</div>
|
data/doc/Lazier/Boolean.html
CHANGED
@@ -288,7 +288,7 @@
|
|
288
288
|
</div>
|
289
289
|
|
290
290
|
<div id="footer">
|
291
|
-
Generated on Thu Jun 19 11:
|
291
|
+
Generated on Thu Jun 19 11:49:05 2014 by
|
292
292
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
293
293
|
0.8.7.4 (ruby-2.1.2).
|
294
294
|
</div>
|
@@ -386,7 +386,7 @@ Options are as follows:</p>
|
|
386
386
|
</div>
|
387
387
|
|
388
388
|
<div id="footer">
|
389
|
-
Generated on Thu Jun 19 11:
|
389
|
+
Generated on Thu Jun 19 11:49:05 2014 by
|
390
390
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
391
391
|
0.8.7.4 (ruby-2.1.2).
|
392
392
|
</div>
|
data/doc/Lazier/DateTime.html
CHANGED
@@ -721,7 +721,7 @@ DateTime.civil(2013, 6, 1).in_months(2011)
|
|
721
721
|
</div>
|
722
722
|
|
723
723
|
<div id="footer">
|
724
|
-
Generated on Thu Jun 19 11:
|
724
|
+
Generated on Thu Jun 19 11:49:05 2014 by
|
725
725
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
726
726
|
0.8.7.4 (ruby-2.1.2).
|
727
727
|
</div>
|
@@ -1554,7 +1554,7 @@ Date.years(1, true, 2010, true)
|
|
1554
1554
|
</div>
|
1555
1555
|
|
1556
1556
|
<div id="footer">
|
1557
|
-
Generated on Thu Jun 19 11:
|
1557
|
+
Generated on Thu Jun 19 11:49:05 2014 by
|
1558
1558
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1559
1559
|
0.8.7.4 (ruby-2.1.2).
|
1560
1560
|
</div>
|
data/doc/Lazier/Exceptions.html
CHANGED
@@ -116,7 +116,7 @@
|
|
116
116
|
</div>
|
117
117
|
|
118
118
|
<div id="footer">
|
119
|
-
Generated on Thu Jun 19 11:
|
119
|
+
Generated on Thu Jun 19 11:49:05 2014 by
|
120
120
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
121
121
|
0.8.7.4 (ruby-2.1.2).
|
122
122
|
</div>
|
@@ -124,7 +124,7 @@
|
|
124
124
|
</div>
|
125
125
|
|
126
126
|
<div id="footer">
|
127
|
-
Generated on Thu Jun 19 11:
|
127
|
+
Generated on Thu Jun 19 11:49:05 2014 by
|
128
128
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
129
129
|
0.8.7.4 (ruby-2.1.2).
|
130
130
|
</div>
|
@@ -238,7 +238,7 @@
|
|
238
238
|
</div>
|
239
239
|
|
240
240
|
<div id="footer">
|
241
|
-
Generated on Thu Jun 19 11:
|
241
|
+
Generated on Thu Jun 19 11:49:05 2014 by
|
242
242
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
243
243
|
0.8.7.4 (ruby-2.1.2).
|
244
244
|
</div>
|
data/doc/Lazier/Hash.html
CHANGED
@@ -688,7 +688,7 @@
|
|
688
688
|
</div>
|
689
689
|
|
690
690
|
<div id="footer">
|
691
|
-
Generated on Thu Jun 19 11:
|
691
|
+
Generated on Thu Jun 19 11:49:04 2014 by
|
692
692
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
693
693
|
0.8.7.4 (ruby-2.1.2).
|
694
694
|
</div>
|
data/doc/Lazier/I18n.html
CHANGED
@@ -1076,7 +1076,7 @@
|
|
1076
1076
|
</div>
|
1077
1077
|
|
1078
1078
|
<div id="footer">
|
1079
|
-
Generated on Thu Jun 19 11:
|
1079
|
+
Generated on Thu Jun 19 11:49:04 2014 by
|
1080
1080
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1081
1081
|
0.8.7.4 (ruby-2.1.2).
|
1082
1082
|
</div>
|
data/doc/Lazier/Localizer.html
CHANGED
@@ -536,7 +536,7 @@
|
|
536
536
|
</div>
|
537
537
|
|
538
538
|
<div id="footer">
|
539
|
-
Generated on Thu Jun 19 11:
|
539
|
+
Generated on Thu Jun 19 11:49:05 2014 by
|
540
540
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
541
541
|
0.8.7.4 (ruby-2.1.2).
|
542
542
|
</div>
|
data/doc/Lazier/Math.html
CHANGED
@@ -121,7 +121,7 @@
|
|
121
121
|
</div>
|
122
122
|
|
123
123
|
<div id="footer">
|
124
|
-
Generated on Thu Jun 19 11:
|
124
|
+
Generated on Thu Jun 19 11:49:04 2014 by
|
125
125
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
126
126
|
0.8.7.4 (ruby-2.1.2).
|
127
127
|
</div>
|
@@ -321,7 +321,7 @@
|
|
321
321
|
</div>
|
322
322
|
|
323
323
|
<div id="footer">
|
324
|
-
Generated on Thu Jun 19 11:
|
324
|
+
Generated on Thu Jun 19 11:49:04 2014 by
|
325
325
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
326
326
|
0.8.7.4 (ruby-2.1.2).
|
327
327
|
</div>
|
data/doc/Lazier/Object.html
CHANGED
@@ -2317,7 +2317,7 @@ Passing <code>nil</code> is equal to pass an empty Hash.</p>
|
|
2317
2317
|
</div>
|
2318
2318
|
|
2319
2319
|
<div id="footer">
|
2320
|
-
Generated on Thu Jun 19 11:
|
2320
|
+
Generated on Thu Jun 19 11:49:05 2014 by
|
2321
2321
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2322
2322
|
0.8.7.4 (ruby-2.1.2).
|
2323
2323
|
</div>
|
data/doc/Lazier/Pathname.html
CHANGED
@@ -213,7 +213,7 @@ Pathname.new("/usr/bin/ruby").components
|
|
213
213
|
</div>
|
214
214
|
|
215
215
|
<div id="footer">
|
216
|
-
Generated on Thu Jun 19 11:
|
216
|
+
Generated on Thu Jun 19 11:49:05 2014 by
|
217
217
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
218
218
|
0.8.7.4 (ruby-2.1.2).
|
219
219
|
</div>
|
data/doc/Lazier/Settings.html
CHANGED
@@ -2429,7 +2429,7 @@
|
|
2429
2429
|
</div>
|
2430
2430
|
|
2431
2431
|
<div id="footer">
|
2432
|
-
Generated on Thu Jun 19 11:
|
2432
|
+
Generated on Thu Jun 19 11:49:05 2014 by
|
2433
2433
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2434
2434
|
0.8.7.4 (ruby-2.1.2).
|
2435
2435
|
</div>
|
data/doc/Lazier/String.html
CHANGED
@@ -723,7 +723,7 @@
|
|
723
723
|
</div>
|
724
724
|
|
725
725
|
<div id="footer">
|
726
|
-
Generated on Thu Jun 19 11:
|
726
|
+
Generated on Thu Jun 19 11:49:05 2014 by
|
727
727
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
728
728
|
0.8.7.4 (ruby-2.1.2).
|
729
729
|
</div>
|
data/doc/Lazier/TimeZone.html
CHANGED
@@ -497,13 +497,13 @@
|
|
497
497
|
<pre class="lines">
|
498
498
|
|
499
499
|
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
500
|
+
150
|
501
|
+
151
|
502
|
+
152
|
503
|
+
153</pre>
|
504
504
|
</td>
|
505
505
|
<td>
|
506
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line
|
506
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line 150</span>
|
507
507
|
|
508
508
|
<span class='kw'>def</span> <span class='id identifier rubyid_aliases'>aliases</span>
|
509
509
|
<span class='id identifier rubyid_reference'>reference</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='op'>::</span><span class='const'>MAPPING</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>_</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
@@ -556,9 +556,6 @@
|
|
556
556
|
<pre class="lines">
|
557
557
|
|
558
558
|
|
559
|
-
166
|
560
|
-
167
|
561
|
-
168
|
562
559
|
169
|
563
560
|
170
|
564
561
|
171
|
@@ -570,10 +567,13 @@
|
|
570
567
|
177
|
571
568
|
178
|
572
569
|
179
|
573
|
-
180
|
570
|
+
180
|
571
|
+
181
|
572
|
+
182
|
573
|
+
183</pre>
|
574
574
|
</td>
|
575
575
|
<td>
|
576
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line
|
576
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line 169</span>
|
577
577
|
|
578
578
|
<span class='kw'>def</span> <span class='id identifier rubyid_current_alias'>current_alias</span>
|
579
579
|
<span class='kw'>if</span> <span class='ivar'>@current_alias</span>
|
@@ -639,12 +639,12 @@
|
|
639
639
|
<pre class="lines">
|
640
640
|
|
641
641
|
|
642
|
-
|
643
|
-
|
644
|
-
|
642
|
+
188
|
643
|
+
189
|
644
|
+
190</pre>
|
645
645
|
</td>
|
646
646
|
<td>
|
647
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line
|
647
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line 188</span>
|
648
648
|
|
649
649
|
<span class='kw'>def</span> <span class='id identifier rubyid_current_alias='>current_alias=</span><span class='lparen'>(</span><span class='id identifier rubyid_new_alias'>new_alias</span><span class='rparen'>)</span>
|
650
650
|
<span class='ivar'>@current_alias</span> <span class='op'>=</span> <span class='id identifier rubyid_new_alias'>new_alias</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span>
|
@@ -734,14 +734,14 @@
|
|
734
734
|
<pre class="lines">
|
735
735
|
|
736
736
|
|
737
|
-
157
|
738
|
-
158
|
739
|
-
159
|
740
737
|
160
|
741
|
-
161
|
738
|
+
161
|
739
|
+
162
|
740
|
+
163
|
741
|
+
164</pre>
|
742
742
|
</td>
|
743
743
|
<td>
|
744
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line
|
744
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line 160</span>
|
745
745
|
|
746
746
|
<span class='kw'>def</span> <span class='id identifier rubyid_current_offset'>current_offset</span><span class='lparen'>(</span><span class='id identifier rubyid_rational'>rational</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_date'>date</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
747
747
|
<span class='id identifier rubyid_date'>date</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>DateTime</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span>
|
@@ -833,12 +833,12 @@
|
|
833
833
|
<pre class="lines">
|
834
834
|
|
835
835
|
|
836
|
-
|
837
|
-
|
838
|
-
|
836
|
+
232
|
837
|
+
233
|
838
|
+
234</pre>
|
839
839
|
</td>
|
840
840
|
<td>
|
841
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line
|
841
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line 232</span>
|
842
842
|
|
843
843
|
<span class='kw'>def</span> <span class='id identifier rubyid_dst_correction'>dst_correction</span><span class='lparen'>(</span><span class='id identifier rubyid_rational'>rational</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_year'>year</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
844
844
|
<span class='id identifier rubyid_dst_offset'>dst_offset</span><span class='lparen'>(</span><span class='id identifier rubyid_rational'>rational</span><span class='comma'>,</span> <span class='id identifier rubyid_year'>year</span><span class='comma'>,</span> <span class='symbol'>:std_offset</span><span class='rparen'>)</span>
|
@@ -945,12 +945,12 @@
|
|
945
945
|
<pre class="lines">
|
946
946
|
|
947
947
|
|
948
|
-
|
949
|
-
|
950
|
-
|
948
|
+
254
|
949
|
+
255
|
950
|
+
256</pre>
|
951
951
|
</td>
|
952
952
|
<td>
|
953
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line
|
953
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line 254</span>
|
954
954
|
|
955
955
|
<span class='kw'>def</span> <span class='id identifier rubyid_dst_name'>dst_name</span><span class='lparen'>(</span><span class='id identifier rubyid_dst_label'>dst_label</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_year'>year</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
956
956
|
<span class='id identifier rubyid_uses_dst?'>uses_dst?</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span> <span class='op'>||</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dst_label'>dst_label</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>(DST)</span><span class='tstring_end'>"</span></span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='op'>:</span> <span class='kw'>nil</span>
|
@@ -1057,14 +1057,14 @@
|
|
1057
1057
|
<pre class="lines">
|
1058
1058
|
|
1059
1059
|
|
1060
|
-
239
|
1061
|
-
240
|
1062
|
-
241
|
1063
1060
|
242
|
1064
|
-
243
|
1061
|
+
243
|
1062
|
+
244
|
1063
|
+
245
|
1064
|
+
246</pre>
|
1065
1065
|
</td>
|
1066
1066
|
<td>
|
1067
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line
|
1067
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line 242</span>
|
1068
1068
|
|
1069
1069
|
<span class='kw'>def</span> <span class='id identifier rubyid_dst_offset'>dst_offset</span><span class='lparen'>(</span><span class='id identifier rubyid_rational'>rational</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_year'>year</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_method'>method</span> <span class='op'>=</span> <span class='symbol'>:utc_total_offset</span><span class='rparen'>)</span>
|
1070
1070
|
<span class='id identifier rubyid_period'>period</span> <span class='op'>=</span> <span class='id identifier rubyid_dst_period'>dst_period</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span><span class='rparen'>)</span>
|
@@ -1139,19 +1139,19 @@
|
|
1139
1139
|
<pre class="lines">
|
1140
1140
|
|
1141
1141
|
|
1142
|
-
201
|
1143
|
-
202
|
1144
|
-
203
|
1145
1142
|
204
|
1146
1143
|
205
|
1147
1144
|
206
|
1148
1145
|
207
|
1149
1146
|
208
|
1150
1147
|
209
|
1151
|
-
210
|
1148
|
+
210
|
1149
|
+
211
|
1150
|
+
212
|
1151
|
+
213</pre>
|
1152
1152
|
</td>
|
1153
1153
|
<td>
|
1154
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line
|
1154
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line 204</span>
|
1155
1155
|
|
1156
1156
|
<span class='kw'>def</span> <span class='id identifier rubyid_dst_period'>dst_period</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1157
1157
|
<span class='id identifier rubyid_year'>year</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>Date</span><span class='period'>.</span><span class='id identifier rubyid_today'>today</span><span class='period'>.</span><span class='id identifier rubyid_year'>year</span>
|
@@ -1231,12 +1231,12 @@
|
|
1231
1231
|
<pre class="lines">
|
1232
1232
|
|
1233
1233
|
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1234
|
+
196
|
1235
|
+
197
|
1236
|
+
198</pre>
|
1237
1237
|
</td>
|
1238
1238
|
<td>
|
1239
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line
|
1239
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line 196</span>
|
1240
1240
|
|
1241
1241
|
<span class='kw'>def</span> <span class='id identifier rubyid_offset'>offset</span><span class='lparen'>(</span><span class='id identifier rubyid_rational'>rational</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
1242
1242
|
<span class='id identifier rubyid_rational'>rational</span> <span class='op'>?</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_rationalize_offset'>rationalize_offset</span><span class='lparen'>(</span><span class='id identifier rubyid_utc_offset'>utc_offset</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_utc_offset'>utc_offset</span>
|
@@ -1326,12 +1326,12 @@
|
|
1326
1326
|
<pre class="lines">
|
1327
1327
|
|
1328
1328
|
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1329
|
+
263
|
1330
|
+
264
|
1331
|
+
265</pre>
|
1332
1332
|
</td>
|
1333
1333
|
<td>
|
1334
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line
|
1334
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line 263</span>
|
1335
1335
|
|
1336
1336
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_str'>to_str</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_colon'>colon</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
1337
1337
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>(GMT</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_formatted_offset'>formatted_offset</span><span class='lparen'>(</span><span class='id identifier rubyid_colon'>colon</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>) </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span> <span class='op'>||</span> <span class='id identifier rubyid_current_alias'>current_alias</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
@@ -1421,12 +1421,12 @@
|
|
1421
1421
|
<pre class="lines">
|
1422
1422
|
|
1423
1423
|
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1424
|
+
282
|
1425
|
+
283
|
1426
|
+
284</pre>
|
1427
1427
|
</td>
|
1428
1428
|
<td>
|
1429
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line
|
1429
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line 282</span>
|
1430
1430
|
|
1431
1431
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_str_parameterized'>to_str_parameterized</span><span class='lparen'>(</span><span class='id identifier rubyid_with_offset'>with_offset</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1432
1432
|
<span class='op'>::</span><span class='const'>ActiveSupport</span><span class='op'>::</span><span class='const'>TimeZone</span><span class='period'>.</span><span class='id identifier rubyid_parameterize_zone'>parameterize_zone</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>||</span> <span class='id identifier rubyid_to_str'>to_str</span><span class='comma'>,</span> <span class='id identifier rubyid_with_offset'>with_offset</span><span class='rparen'>)</span>
|
@@ -1533,12 +1533,12 @@
|
|
1533
1533
|
<pre class="lines">
|
1534
1534
|
|
1535
1535
|
|
1536
|
-
|
1537
|
-
|
1538
|
-
|
1536
|
+
273
|
1537
|
+
274
|
1538
|
+
275</pre>
|
1539
1539
|
</td>
|
1540
1540
|
<td>
|
1541
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line
|
1541
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line 273</span>
|
1542
1542
|
|
1543
1543
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_str_with_dst'>to_str_with_dst</span><span class='lparen'>(</span><span class='id identifier rubyid_dst_label'>dst_label</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_year'>year</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1544
1544
|
<span class='id identifier rubyid_uses_dst?'>uses_dst?</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>(GMT</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_seconds_to_utc_offset'>seconds_to_utc_offset</span><span class='lparen'>(</span><span class='id identifier rubyid_dst_period'>dst_period</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_utc_total_offset'>utc_total_offset</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>) </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span> <span class='op'>||</span> <span class='id identifier rubyid_current_alias'>current_alias</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dst_label'>dst_label</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>(DST)</span><span class='tstring_end'>"</span></span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='op'>:</span> <span class='kw'>nil</span>
|
@@ -1645,13 +1645,13 @@
|
|
1645
1645
|
<pre class="lines">
|
1646
1646
|
|
1647
1647
|
|
1648
|
-
|
1649
|
-
|
1650
|
-
|
1651
|
-
|
1648
|
+
292
|
1649
|
+
293
|
1650
|
+
294
|
1651
|
+
295</pre>
|
1652
1652
|
</td>
|
1653
1653
|
<td>
|
1654
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line
|
1654
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line 292</span>
|
1655
1655
|
|
1656
1656
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_str_with_dst_parameterized'>to_str_with_dst_parameterized</span><span class='lparen'>(</span><span class='id identifier rubyid_dst_label'>dst_label</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_year'>year</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1657
1657
|
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_to_str_with_dst'>to_str_with_dst</span><span class='lparen'>(</span><span class='id identifier rubyid_dst_label'>dst_label</span><span class='comma'>,</span> <span class='id identifier rubyid_year'>year</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
@@ -1725,16 +1725,16 @@
|
|
1725
1725
|
<pre class="lines">
|
1726
1726
|
|
1727
1727
|
|
1728
|
-
216
|
1729
|
-
217
|
1730
|
-
218
|
1731
1728
|
219
|
1732
1729
|
220
|
1733
1730
|
221
|
1734
|
-
222
|
1731
|
+
222
|
1732
|
+
223
|
1733
|
+
224
|
1734
|
+
225</pre>
|
1735
1735
|
</td>
|
1736
1736
|
<td>
|
1737
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line
|
1737
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line 219</span>
|
1738
1738
|
|
1739
1739
|
<span class='kw'>def</span> <span class='id identifier rubyid_uses_dst?'>uses_dst?</span><span class='lparen'>(</span><span class='id identifier rubyid_reference'>reference</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1740
1740
|
<span class='kw'>if</span> <span class='id identifier rubyid_reference'>reference</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:year</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_reference'>reference</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:utc</span><span class='rparen'>)</span> <span class='comment'># This is a date like object
|
@@ -1753,7 +1753,7 @@
|
|
1753
1753
|
</div>
|
1754
1754
|
|
1755
1755
|
<div id="footer">
|
1756
|
-
Generated on Thu Jun 19 11:
|
1756
|
+
Generated on Thu Jun 19 11:49:05 2014 by
|
1757
1757
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1758
1758
|
0.8.7.4 (ruby-2.1.2).
|
1759
1759
|
</div>
|
@@ -355,14 +355,14 @@
|
|
355
355
|
<pre class="lines">
|
356
356
|
|
357
357
|
|
358
|
-
109
|
359
|
-
110
|
360
|
-
111
|
361
358
|
112
|
362
|
-
113
|
359
|
+
113
|
360
|
+
114
|
361
|
+
115
|
362
|
+
116</pre>
|
363
363
|
</td>
|
364
364
|
<td>
|
365
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line
|
365
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line 112</span>
|
366
366
|
|
367
367
|
<span class='kw'>def</span> <span class='id identifier rubyid_compare'>compare</span><span class='lparen'>(</span><span class='id identifier rubyid_left'>left</span><span class='comma'>,</span> <span class='id identifier rubyid_right'>right</span><span class='rparen'>)</span>
|
368
368
|
<span class='id identifier rubyid_left'>left</span> <span class='op'>=</span> <span class='id identifier rubyid_left'>left</span><span class='period'>.</span><span class='id identifier rubyid_to_str'>to_str</span> <span class='kw'>if</span> <span class='id identifier rubyid_left'>left</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>ActiveSupport</span><span class='op'>::</span><span class='const'>TimeZone</span><span class='rparen'>)</span>
|
@@ -462,7 +462,10 @@
|
|
462
462
|
43
|
463
463
|
44
|
464
464
|
45
|
465
|
-
46
|
465
|
+
46
|
466
|
+
47
|
467
|
+
48
|
468
|
+
49</pre>
|
466
469
|
</td>
|
467
470
|
<td>
|
468
471
|
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line 36</span>
|
@@ -471,7 +474,10 @@
|
|
471
474
|
<span class='id identifier rubyid_catch'>catch</span><span class='lparen'>(</span><span class='symbol'>:zone</span><span class='rparen'>)</span> <span class='kw'>do</span>
|
472
475
|
<span class='op'>::</span><span class='const'>ActiveSupport</span><span class='op'>::</span><span class='const'>TimeZone</span><span class='period'>.</span><span class='id identifier rubyid_all'>all</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_zone'>zone</span><span class='op'>|</span>
|
473
476
|
<span class='id identifier rubyid_zone'>zone</span><span class='period'>.</span><span class='id identifier rubyid_aliases'>aliases</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_zone_alias'>zone_alias</span><span class='op'>|</span>
|
474
|
-
<span class='
|
477
|
+
<span class='kw'>if</span> <span class='lbracket'>[</span><span class='id identifier rubyid_zone'>zone</span><span class='period'>.</span><span class='id identifier rubyid_to_str'>to_str</span><span class='lparen'>(</span><span class='id identifier rubyid_zone_alias'>zone_alias</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_zone'>zone</span><span class='period'>.</span><span class='id identifier rubyid_to_str_with_dst'>to_str_with_dst</span><span class='lparen'>(</span><span class='id identifier rubyid_dst_label'>dst_label</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_zone_alias'>zone_alias</span><span class='rparen'>)</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
478
|
+
<span class='id identifier rubyid_zone'>zone</span><span class='period'>.</span><span class='id identifier rubyid_current_alias'>current_alias</span> <span class='op'>=</span> <span class='id identifier rubyid_zone_alias'>zone_alias</span>
|
479
|
+
<span class='id identifier rubyid_throw'>throw</span><span class='lparen'>(</span><span class='symbol'>:zone</span><span class='comma'>,</span> <span class='id identifier rubyid_zone'>zone</span><span class='rparen'>)</span>
|
480
|
+
<span class='kw'>end</span>
|
475
481
|
<span class='kw'>end</span>
|
476
482
|
<span class='kw'>end</span>
|
477
483
|
|
@@ -656,19 +662,19 @@
|
|
656
662
|
<pre class="lines">
|
657
663
|
|
658
664
|
|
659
|
-
53
|
660
|
-
54
|
661
|
-
55
|
662
665
|
56
|
663
666
|
57
|
664
667
|
58
|
665
668
|
59
|
666
669
|
60
|
667
670
|
61
|
668
|
-
62
|
671
|
+
62
|
672
|
+
63
|
673
|
+
64
|
674
|
+
65</pre>
|
669
675
|
</td>
|
670
676
|
<td>
|
671
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line
|
677
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line 56</span>
|
672
678
|
|
673
679
|
<span class='kw'>def</span> <span class='id identifier rubyid_list_all'>list_all</span><span class='lparen'>(</span><span class='id identifier rubyid_with_dst'>with_dst</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_dst_label'>dst_label</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
674
680
|
<span class='id identifier rubyid_dst_label'>dst_label</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>(DST)</span><span class='tstring_end'>"</span></span>
|
@@ -768,9 +774,6 @@ DateTime.parameterize_zone(ActiveSupport::TimeZone["Pacific Time (US & Canad
|
|
768
774
|
<pre class="lines">
|
769
775
|
|
770
776
|
|
771
|
-
73
|
772
|
-
74
|
773
|
-
75
|
774
777
|
76
|
775
778
|
77
|
776
779
|
78
|
@@ -779,10 +782,13 @@ DateTime.parameterize_zone(ActiveSupport::TimeZone["Pacific Time (US & Canad
|
|
779
782
|
81
|
780
783
|
82
|
781
784
|
83
|
782
|
-
84
|
785
|
+
84
|
786
|
+
85
|
787
|
+
86
|
788
|
+
87</pre>
|
783
789
|
</td>
|
784
790
|
<td>
|
785
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line
|
791
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line 76</span>
|
786
792
|
|
787
793
|
<span class='kw'>def</span> <span class='id identifier rubyid_parameterize_zone'>parameterize_zone</span><span class='lparen'>(</span><span class='id identifier rubyid_tz'>tz</span><span class='comma'>,</span> <span class='id identifier rubyid_with_offset'>with_offset</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
788
794
|
<span class='id identifier rubyid_tz'>tz</span> <span class='op'>=</span> <span class='id identifier rubyid_tz'>tz</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='kw'>unless</span> <span class='id identifier rubyid_tz'>tz</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>String</span><span class='rparen'>)</span>
|
@@ -979,19 +985,19 @@ DateTime.parameterize_zone(ActiveSupport::TimeZone["Pacific Time (US & Canad
|
|
979
985
|
<pre class="lines">
|
980
986
|
|
981
987
|
|
982
|
-
93
|
983
|
-
94
|
984
|
-
95
|
985
988
|
96
|
986
989
|
97
|
987
990
|
98
|
988
991
|
99
|
989
992
|
100
|
990
993
|
101
|
991
|
-
102
|
994
|
+
102
|
995
|
+
103
|
996
|
+
104
|
997
|
+
105</pre>
|
992
998
|
</td>
|
993
999
|
<td>
|
994
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line
|
1000
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line 96</span>
|
995
1001
|
|
996
1002
|
<span class='kw'>def</span> <span class='id identifier rubyid_unparameterize_zone'>unparameterize_zone</span><span class='lparen'>(</span><span class='id identifier rubyid_tz'>tz</span><span class='comma'>,</span> <span class='id identifier rubyid_as_string'>as_string</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_dst_label'>dst_label</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
997
1003
|
<span class='id identifier rubyid_tz'>tz</span> <span class='op'>=</span> <span class='id identifier rubyid_parameterize_zone'>parameterize_zone</span><span class='lparen'>(</span><span class='id identifier rubyid_tz'>tz</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
@@ -1013,7 +1019,7 @@ DateTime.parameterize_zone(ActiveSupport::TimeZone["Pacific Time (US & Canad
|
|
1013
1019
|
</div>
|
1014
1020
|
|
1015
1021
|
<div id="footer">
|
1016
|
-
Generated on Thu Jun 19 11:
|
1022
|
+
Generated on Thu Jun 19 11:49:05 2014 by
|
1017
1023
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1018
1024
|
0.8.7.4 (ruby-2.1.2).
|
1019
1025
|
</div>
|
data/doc/Lazier/Version.html
CHANGED
@@ -149,7 +149,7 @@
|
|
149
149
|
|
150
150
|
</div>
|
151
151
|
</dt>
|
152
|
-
<dd><pre class="code"><span class='int'>
|
152
|
+
<dd><pre class="code"><span class='int'>7</span></pre></dd>
|
153
153
|
|
154
154
|
<dt id="STRING-constant" class="">STRING =
|
155
155
|
<div class="docstring">
|
@@ -180,7 +180,7 @@
|
|
180
180
|
</div>
|
181
181
|
|
182
182
|
<div id="footer">
|
183
|
-
Generated on Thu Jun 19 11:
|
183
|
+
Generated on Thu Jun 19 11:49:05 2014 by
|
184
184
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
185
185
|
0.8.7.4 (ruby-2.1.2).
|
186
186
|
</div>
|
data/doc/_index.html
CHANGED
@@ -333,7 +333,7 @@
|
|
333
333
|
</div>
|
334
334
|
|
335
335
|
<div id="footer">
|
336
|
-
Generated on Thu Jun 19 11:
|
336
|
+
Generated on Thu Jun 19 11:49:04 2014 by
|
337
337
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
338
338
|
0.8.7.4 (ruby-2.1.2).
|
339
339
|
</div>
|
data/doc/file.README.html
CHANGED
@@ -106,7 +106,7 @@ See documentation for more informations.</p>
|
|
106
106
|
</div></div>
|
107
107
|
|
108
108
|
<div id="footer">
|
109
|
-
Generated on Thu Jun 19 11:
|
109
|
+
Generated on Thu Jun 19 11:49:04 2014 by
|
110
110
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
111
111
|
0.8.7.4 (ruby-2.1.2).
|
112
112
|
</div>
|
data/doc/index.html
CHANGED
@@ -106,7 +106,7 @@ See documentation for more informations.</p>
|
|
106
106
|
</div></div>
|
107
107
|
|
108
108
|
<div id="footer">
|
109
|
-
Generated on Thu Jun 19 11:
|
109
|
+
Generated on Thu Jun 19 11:49:04 2014 by
|
110
110
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
111
111
|
0.8.7.4 (ruby-2.1.2).
|
112
112
|
</div>
|
@@ -103,7 +103,7 @@
|
|
103
103
|
</div>
|
104
104
|
|
105
105
|
<div id="footer">
|
106
|
-
Generated on Thu Jun 19 11:
|
106
|
+
Generated on Thu Jun 19 11:49:04 2014 by
|
107
107
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
108
108
|
0.8.7.4 (ruby-2.1.2).
|
109
109
|
</div>
|
data/lib/lazier/timezone.rb
CHANGED
@@ -37,7 +37,10 @@ module Lazier
|
|
37
37
|
catch(:zone) do
|
38
38
|
::ActiveSupport::TimeZone.all.each do |zone|
|
39
39
|
zone.aliases.each do |zone_alias|
|
40
|
-
|
40
|
+
if [zone.to_str(zone_alias), zone.to_str_with_dst(dst_label, nil, zone_alias)].include?(name)
|
41
|
+
zone.current_alias = zone_alias
|
42
|
+
throw(:zone, zone)
|
43
|
+
end
|
41
44
|
end
|
42
45
|
end
|
43
46
|
|
@@ -130,7 +133,7 @@ module Lazier
|
|
130
133
|
#
|
131
134
|
# @param dst_label [String] Label for the DST indication. Defaults to `(DST)`.
|
132
135
|
# @param matcher [Regexp] The expression to match.
|
133
|
-
# @return [
|
136
|
+
# @return [String] The found timezone or `nil` if the zone is not valid.
|
134
137
|
def find_parameterized_zone(dst_label, matcher)
|
135
138
|
catch(:zone) do
|
136
139
|
list_all(true, dst_label).each do |zone|
|
data/lib/lazier/version.rb
CHANGED
@@ -7,7 +7,6 @@
|
|
7
7
|
require "spec_helper"
|
8
8
|
|
9
9
|
describe Lazier::TimeZone do
|
10
|
-
let(:subject_zone) { ::ActiveSupport::TimeZone["Mountain Time (US & Canada)"] }
|
11
10
|
let(:subject_zone) { ::ActiveSupport::TimeZone["Mountain Time (US & Canada)"] }
|
12
11
|
let(:zone_without_dst) { ::ActiveSupport::TimeZone["International Date Line West"] }
|
13
12
|
|
@@ -144,8 +143,8 @@ describe Lazier::TimeZone do
|
|
144
143
|
|
145
144
|
describe "#to_str_with_dst" do
|
146
145
|
it "should correctly format zone with Daylight Saving Time" do
|
147
|
-
expect(subject_zone.to_str_with_dst).to eq("(GMT-06:00) #{subject_zone.
|
148
|
-
expect(subject_zone.to_str_with_dst("Daylight Saving Time")).to eq("(GMT-06:00) #{subject_zone.
|
146
|
+
expect(subject_zone.to_str_with_dst).to eq("(GMT-06:00) #{subject_zone.current_alias} (DST)")
|
147
|
+
expect(subject_zone.to_str_with_dst("Daylight Saving Time")).to eq("(GMT-06:00) #{subject_zone.current_alias} Daylight Saving Time")
|
149
148
|
expect(subject_zone.to_str_with_dst("Daylight Saving Time", nil, "NAME")).to eq("(GMT-06:00) NAME Daylight Saving Time")
|
150
149
|
expect(subject_zone.to_str_with_dst(nil, 1000)).to be_nil
|
151
150
|
expect(zone_without_dst.to_str_with_dst).to be_nil
|
@@ -162,8 +161,8 @@ describe Lazier::TimeZone do
|
|
162
161
|
|
163
162
|
describe "#to_str_with_dst_parameterized" do
|
164
163
|
it "should correctly format (parameterized) zone with Daylight Saving Time" do
|
165
|
-
expect(subject_zone.to_str_with_dst_parameterized).to eq("-0600@
|
166
|
-
expect(subject_zone.to_str_with_dst_parameterized("Daylight Saving Time")).to eq("-0600@
|
164
|
+
expect(subject_zone.to_str_with_dst_parameterized).to eq("-0600@mountain-time-us-canada-dst")
|
165
|
+
expect(subject_zone.to_str_with_dst_parameterized("Daylight Saving Time")).to eq("-0600@mountain-time-us-canada-daylight-saving-time")
|
167
166
|
expect(subject_zone.to_str_with_dst_parameterized(nil, 1000)).to be_nil
|
168
167
|
expect(subject_zone.to_str_with_dst_parameterized("Daylight Saving Time", nil, "NAME SPACE")).to eq("-0600@name-space-daylight-saving-time")
|
169
168
|
expect(zone_without_dst.to_str_with_dst_parameterized).to be_nil
|