cowtech-extensions 2.6.0 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/Cowtech.html +1 -1
- data/doc/Cowtech/Extensions.html +1 -1
- data/doc/Cowtech/Extensions/Boolean.html +1 -1
- data/doc/Cowtech/Extensions/DateTime.html +1 -1
- data/doc/Cowtech/Extensions/DateTime/ClassMethods.html +4 -4
- data/doc/Cowtech/Extensions/Exceptions.html +1 -1
- data/doc/Cowtech/Extensions/Exceptions/Dump.html +1 -1
- data/doc/Cowtech/Extensions/Hash.html +1 -1
- data/doc/Cowtech/Extensions/Math.html +1 -1
- data/doc/Cowtech/Extensions/Math/ClassMethods.html +1 -1
- data/doc/Cowtech/Extensions/Object.html +1 -1
- data/doc/Cowtech/Extensions/Pathname.html +1 -1
- data/doc/Cowtech/Extensions/Settings.html +1 -1
- data/doc/Cowtech/Extensions/String.html +1 -1
- data/doc/Cowtech/Extensions/TimeZone.html +445 -110
- data/doc/Cowtech/Extensions/TimeZone/ClassMethods.html +165 -35
- data/doc/Cowtech/Extensions/Version.html +1 -1
- data/doc/_index.html +1 -1
- data/doc/file.README.html +1 -1
- data/doc/index.html +1 -1
- data/doc/method_list.html +38 -14
- data/doc/top-level-namespace.html +1 -1
- data/lib/cowtech-extensions/datetime.rb +95 -33
- data/lib/cowtech-extensions/version.rb +1 -1
- data/spec/cowtech-extensions/datetime_spec.rb +33 -30
- metadata +2 -2
@@ -112,6 +112,29 @@
|
|
112
112
|
<li class="public ">
|
113
113
|
<span class="summary_signature">
|
114
114
|
|
115
|
+
<a href="#compare-instance_method" title="#compare (instance method)">- (Fixnum) <strong>compare</strong>(left, right) </a>
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
</span>
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
<span class="summary_desc"><div class='inline'><p>Compares two timezones.</p>
|
130
|
+
</div></span>
|
131
|
+
|
132
|
+
</li>
|
133
|
+
|
134
|
+
|
135
|
+
<li class="public ">
|
136
|
+
<span class="summary_signature">
|
137
|
+
|
115
138
|
<a href="#find-instance_method" title="#find (instance method)">- (TimeZone) <strong>find</strong>(name, dst_label = nil) </a>
|
116
139
|
|
117
140
|
|
@@ -257,7 +280,102 @@
|
|
257
280
|
|
258
281
|
|
259
282
|
<div class="method_details first">
|
260
|
-
<h3 class="signature first" id="
|
283
|
+
<h3 class="signature first" id="compare-instance_method">
|
284
|
+
|
285
|
+
- (<tt>Fixnum</tt>) <strong>compare</strong>(left, right)
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
</h3><div class="docstring">
|
292
|
+
<div class="discussion">
|
293
|
+
<p>Compares two timezones. They are sorted by the location name.</p>
|
294
|
+
|
295
|
+
|
296
|
+
</div>
|
297
|
+
</div>
|
298
|
+
<div class="tags">
|
299
|
+
<p class="tag_title">Parameters:</p>
|
300
|
+
<ul class="param">
|
301
|
+
|
302
|
+
<li>
|
303
|
+
|
304
|
+
<span class='name'>left</span>
|
305
|
+
|
306
|
+
|
307
|
+
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="Cowtech::Extensions::String (module)">String</a></span>|<span class='object_link'><a href="../TimeZone.html" title="Cowtech::Extensions::TimeZone (module)">TimeZone</a></span></tt>)</span>
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
—
|
312
|
+
<div class='inline'><p>The first zone name to compare.</p>
|
313
|
+
</div>
|
314
|
+
|
315
|
+
</li>
|
316
|
+
|
317
|
+
<li>
|
318
|
+
|
319
|
+
<span class='name'>right</span>
|
320
|
+
|
321
|
+
|
322
|
+
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="Cowtech::Extensions::String (module)">String</a></span>|<span class='object_link'><a href="../TimeZone.html" title="Cowtech::Extensions::TimeZone (module)">TimeZone</a></span></tt>)</span>
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
—
|
327
|
+
<div class='inline'><p>The second zone name to compare.</p>
|
328
|
+
</div>
|
329
|
+
|
330
|
+
</li>
|
331
|
+
|
332
|
+
</ul>
|
333
|
+
|
334
|
+
<p class="tag_title">Returns:</p>
|
335
|
+
<ul class="return">
|
336
|
+
|
337
|
+
<li>
|
338
|
+
|
339
|
+
|
340
|
+
<span class='type'>(<tt>Fixnum</tt>)</span>
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
—
|
345
|
+
<div class='inline'><p>The result of comparison, like Ruby's operator <code><=></code>.</p>
|
346
|
+
</div>
|
347
|
+
|
348
|
+
</li>
|
349
|
+
|
350
|
+
</ul>
|
351
|
+
|
352
|
+
</div><table class="source_code">
|
353
|
+
<tr>
|
354
|
+
<td>
|
355
|
+
<pre class="lines">
|
356
|
+
|
357
|
+
|
358
|
+
378
|
359
|
+
379
|
360
|
+
380
|
361
|
+
381
|
362
|
+
382</pre>
|
363
|
+
</td>
|
364
|
+
<td>
|
365
|
+
<pre class="code"><span class="info file"># File 'lib/cowtech-extensions/datetime.rb', line 378</span>
|
366
|
+
|
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
|
+
<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>
|
369
|
+
<span class='id identifier rubyid_right'>right</span> <span class='op'>=</span> <span class='id identifier rubyid_right'>right</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_right'>right</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>
|
370
|
+
<span class='id identifier rubyid_left'>left</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</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='int'>2</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span> <span class='op'><=></span> <span class='id identifier rubyid_right'>right</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</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='int'>2</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span>
|
371
|
+
<span class='kw'>end</span></pre>
|
372
|
+
</td>
|
373
|
+
</tr>
|
374
|
+
</table>
|
375
|
+
</div>
|
376
|
+
|
377
|
+
<div class="method_details ">
|
378
|
+
<h3 class="signature " id="find-instance_method">
|
261
379
|
|
262
380
|
- (<tt><span class='object_link'><a href="../TimeZone.html" title="Cowtech::Extensions::TimeZone (module)">TimeZone</a></span></tt>) <strong>find</strong>(name, dst_label = nil)
|
263
381
|
|
@@ -303,7 +421,7 @@
|
|
303
421
|
|
304
422
|
|
305
423
|
—
|
306
|
-
<div class='inline'><p>Label for the DST indication. Defaults to <code>(
|
424
|
+
<div class='inline'><p>Label for the DST indication. Defaults to <code>(DST)</code>.</p>
|
307
425
|
</div>
|
308
426
|
|
309
427
|
</li>
|
@@ -342,7 +460,9 @@
|
|
342
460
|
295
|
343
461
|
296
|
344
462
|
297
|
345
|
-
298
|
463
|
+
298
|
464
|
+
299
|
465
|
+
300</pre>
|
346
466
|
</td>
|
347
467
|
<td>
|
348
468
|
<pre class="code"><span class="info file"># File 'lib/cowtech-extensions/datetime.rb', line 290</span>
|
@@ -350,7 +470,9 @@
|
|
350
470
|
<span class='kw'>def</span> <span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</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>
|
351
471
|
<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>
|
352
472
|
<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>
|
353
|
-
<span class='id identifier
|
473
|
+
<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='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> <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>
|
475
|
+
<span class='kw'>end</span>
|
354
476
|
<span class='kw'>end</span>
|
355
477
|
|
356
478
|
<span class='kw'>nil</span>
|
@@ -505,7 +627,7 @@
|
|
505
627
|
|
506
628
|
|
507
629
|
—
|
508
|
-
<div class='inline'><p>Label for the DST indication. Defaults to <code>(
|
630
|
+
<div class='inline'><p>Label for the DST indication. Defaults to <code>(DST)</code>.</p>
|
509
631
|
</div>
|
510
632
|
|
511
633
|
</li>
|
@@ -536,8 +658,6 @@
|
|
536
658
|
<pre class="lines">
|
537
659
|
|
538
660
|
|
539
|
-
305
|
540
|
-
306
|
541
661
|
307
|
542
662
|
308
|
543
663
|
309
|
@@ -550,23 +670,35 @@
|
|
550
670
|
316
|
551
671
|
317
|
552
672
|
318
|
553
|
-
319
|
673
|
+
319
|
674
|
+
320
|
675
|
+
321
|
676
|
+
322
|
677
|
+
323
|
678
|
+
324
|
679
|
+
325
|
680
|
+
326</pre>
|
554
681
|
</td>
|
555
682
|
<td>
|
556
|
-
<pre class="code"><span class="info file"># File 'lib/cowtech-extensions/datetime.rb', line
|
683
|
+
<pre class="code"><span class="info file"># File 'lib/cowtech-extensions/datetime.rb', line 307</span>
|
557
684
|
|
558
685
|
<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>
|
686
|
+
<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>
|
559
687
|
<span class='id identifier rubyid_dst_key'>dst_key</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>DST-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dst_label'>dst_label</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
560
|
-
<span class='ivar'>@zones_names</span> <span class='op'>||=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>STANDARD</span><span class='tstring_end'>"</span></span> <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_collect'>collect</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:to_s</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
688
|
+
<span class='ivar'>@zones_names</span> <span class='op'>||=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>STANDARD</span><span class='tstring_end'>"</span></span> <span class='op'>=></span> <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_collect'>collect</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:to_s</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
561
689
|
|
562
690
|
<span class='kw'>if</span> <span class='id identifier rubyid_with_dst'>with_dst</span> <span class='op'>&&</span> <span class='ivar'>@zones_names</span><span class='lbracket'>[</span><span class='id identifier rubyid_dst_key'>dst_key</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span> <span class='kw'>then</span>
|
563
691
|
<span class='ivar'>@zones_names</span><span class='lbracket'>[</span><span class='id identifier rubyid_dst_key'>dst_key</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
564
692
|
|
565
693
|
<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>
|
566
|
-
<span class='
|
567
|
-
|
694
|
+
<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>
|
695
|
+
<span class='ivar'>@zones_names</span><span class='lbracket'>[</span><span class='id identifier rubyid_dst_key'>dst_key</span><span class='rbracket'>]</span> <span class='op'><<</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>
|
696
|
+
<span class='ivar'>@zones_names</span><span class='lbracket'>[</span><span class='id identifier rubyid_dst_key'>dst_key</span><span class='rbracket'>]</span> <span class='op'><<</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='kw'>if</span> <span class='id identifier rubyid_zone'>zone</span><span class='period'>.</span><span class='id identifier rubyid_uses_dst?'>uses_dst?</span> <span class='op'>&&</span> <span class='id identifier rubyid_zone_alias'>zone_alias</span> <span class='op'>!~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='const'>Regexp</span><span class='period'>.</span><span class='id identifier rubyid_quote'>quote</span><span class='lparen'>(</span><span class='id identifier rubyid_dst_label'>dst_label</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_content'>)$</span><span class='regexp_end'>/</span></span>
|
697
|
+
<span class='kw'>end</span>
|
568
698
|
<span class='kw'>end</span>
|
569
|
-
|
699
|
+
|
700
|
+
<span class='ivar'>@zones_names</span><span class='lbracket'>[</span><span class='id identifier rubyid_dst_key'>dst_key</span><span class='rbracket'>]</span><span class='op'>=</span> <span class='ivar'>@zones_names</span><span class='lbracket'>[</span><span class='id identifier rubyid_dst_key'>dst_key</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_uniq'>uniq</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span><span class='id identifier rubyid_sort'>sort</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='comma'>,</span><span class='id identifier rubyid_b'>b</span><span class='op'>|</span> <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_compare'>compare</span><span class='lparen'>(</span><span class='id identifier rubyid_a'>a</span><span class='comma'>,</span> <span class='id identifier rubyid_b'>b</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='comment'># Sort by name
|
701
|
+
</span> <span class='kw'>end</span>
|
570
702
|
|
571
703
|
<span class='ivar'>@zones_names</span><span class='lbracket'>[</span><span class='id identifier rubyid_with_dst'>with_dst</span> <span class='op'>?</span> <span class='id identifier rubyid_dst_key'>dst_key</span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>STANDARD</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
572
704
|
<span class='kw'>end</span></pre>
|
@@ -657,20 +789,20 @@
|
|
657
789
|
<pre class="lines">
|
658
790
|
|
659
791
|
|
660
|
-
330
|
661
|
-
331
|
662
|
-
332
|
663
|
-
333
|
664
|
-
334
|
665
|
-
335
|
666
|
-
336
|
667
792
|
337
|
668
793
|
338
|
669
794
|
339
|
670
|
-
340
|
795
|
+
340
|
796
|
+
341
|
797
|
+
342
|
798
|
+
343
|
799
|
+
344
|
800
|
+
345
|
801
|
+
346
|
802
|
+
347</pre>
|
671
803
|
</td>
|
672
804
|
<td>
|
673
|
-
<pre class="code"><span class="info file"># File 'lib/cowtech-extensions/datetime.rb', line
|
805
|
+
<pre class="code"><span class="info file"># File 'lib/cowtech-extensions/datetime.rb', line 337</span>
|
674
806
|
|
675
807
|
<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>
|
676
808
|
<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'>if</span> <span class='op'>!</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>
|
@@ -830,7 +962,7 @@
|
|
830
962
|
|
831
963
|
|
832
964
|
—
|
833
|
-
<div class='inline'><p>Label for the DST indication. Defaults to <code>(
|
965
|
+
<div class='inline'><p>Label for the DST indication. Defaults to <code>(DST)</code>.</p>
|
834
966
|
</div>
|
835
967
|
|
836
968
|
</li>
|
@@ -868,13 +1000,6 @@
|
|
868
1000
|
<pre class="lines">
|
869
1001
|
|
870
1002
|
|
871
|
-
349
|
872
|
-
350
|
873
|
-
351
|
874
|
-
352
|
875
|
-
353
|
876
|
-
354
|
877
|
-
355
|
878
1003
|
356
|
879
1004
|
357
|
880
1005
|
358
|
@@ -884,17 +1009,22 @@
|
|
884
1009
|
362
|
885
1010
|
363
|
886
1011
|
364
|
887
|
-
365
|
1012
|
+
365
|
1013
|
+
366
|
1014
|
+
367
|
1015
|
+
368
|
1016
|
+
369
|
1017
|
+
370
|
1018
|
+
371</pre>
|
888
1019
|
</td>
|
889
1020
|
<td>
|
890
|
-
<pre class="code"><span class="info file"># File 'lib/cowtech-extensions/datetime.rb', line
|
1021
|
+
<pre class="code"><span class="info file"># File 'lib/cowtech-extensions/datetime.rb', line 356</span>
|
891
1022
|
|
892
1023
|
<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>
|
893
1024
|
<span class='id identifier rubyid_tz'>tz</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</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>
|
894
|
-
|
895
1025
|
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <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>
|
896
1026
|
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_list_all'>list_all</span><span class='lparen'>(</span><span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_dst_label'>dst_label</span><span class='rparen'>)</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>
|
897
|
-
<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> <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_parameterize_zone'>parameterize_zone</span><span class='lparen'>(</span><span class='id identifier rubyid_zone'>zone</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span> <span class='op'
|
1027
|
+
<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> <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_parameterize_zone'>parameterize_zone</span><span class='lparen'>(</span><span class='id identifier rubyid_zone'>zone</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='const'>Regexp</span><span class='period'>.</span><span class='id identifier rubyid_quote'>quote</span><span class='lparen'>(</span><span class='id identifier rubyid_tz'>tz</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_content'>)$</span><span class='regexp_end'>/</span></span>
|
898
1028
|
<span class='kw'>end</span>
|
899
1029
|
|
900
1030
|
<span class='kw'>nil</span>
|
@@ -916,7 +1046,7 @@
|
|
916
1046
|
</div>
|
917
1047
|
|
918
1048
|
<div id="footer">
|
919
|
-
Generated on
|
1049
|
+
Generated on Tue Jul 24 12:12:52 2012 by
|
920
1050
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
921
1051
|
0.8.2.1 (ruby-1.9.2).
|
922
1052
|
</div>
|
@@ -180,7 +180,7 @@
|
|
180
180
|
</div>
|
181
181
|
|
182
182
|
<div id="footer">
|
183
|
-
Generated on
|
183
|
+
Generated on Tue Jul 24 12:12:52 2012 by
|
184
184
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
185
185
|
0.8.2.1 (ruby-1.9.2).
|
186
186
|
</div>
|
data/doc/_index.html
CHANGED
@@ -296,7 +296,7 @@
|
|
296
296
|
</div>
|
297
297
|
|
298
298
|
<div id="footer">
|
299
|
-
Generated on
|
299
|
+
Generated on Tue Jul 24 12:12:52 2012 by
|
300
300
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
301
301
|
0.8.2.1 (ruby-1.9.2).
|
302
302
|
</div>
|
data/doc/file.README.html
CHANGED
@@ -94,7 +94,7 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
94
94
|
</div></div>
|
95
95
|
|
96
96
|
<div id="footer">
|
97
|
-
Generated on
|
97
|
+
Generated on Tue Jul 24 12:12:52 2012 by
|
98
98
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
99
99
|
0.8.2.1 (ruby-1.9.2).
|
100
100
|
</div>
|
data/doc/index.html
CHANGED
@@ -94,7 +94,7 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
94
94
|
</div></div>
|
95
95
|
|
96
96
|
<div id="footer">
|
97
|
-
Generated on
|
97
|
+
Generated on Tue Jul 24 12:12:52 2012 by
|
98
98
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
99
99
|
0.8.2.1 (ruby-1.9.2).
|
100
100
|
</div>
|
data/doc/method_list.html
CHANGED
@@ -47,6 +47,14 @@
|
|
47
47
|
|
48
48
|
|
49
49
|
<li class="r1 ">
|
50
|
+
<span class='object_link'><a href="Cowtech/Extensions/TimeZone.html#aliases-instance_method" title="Cowtech::Extensions::TimeZone#aliases (method)">#aliases</a></span>
|
51
|
+
|
52
|
+
<small>Cowtech::Extensions::TimeZone</small>
|
53
|
+
|
54
|
+
</li>
|
55
|
+
|
56
|
+
|
57
|
+
<li class="r2 ">
|
50
58
|
<span class='object_link'><a href="Cowtech/Extensions/Settings.html#boolean_names-instance_method" title="Cowtech::Extensions::Settings#boolean_names (method)">#boolean_names</a></span>
|
51
59
|
|
52
60
|
<small>Cowtech::Extensions::Settings</small>
|
@@ -54,6 +62,14 @@
|
|
54
62
|
</li>
|
55
63
|
|
56
64
|
|
65
|
+
<li class="r1 ">
|
66
|
+
<span class='object_link'><a href="Cowtech/Extensions/TimeZone/ClassMethods.html#compare-instance_method" title="Cowtech::Extensions::TimeZone::ClassMethods#compare (method)">#compare</a></span>
|
67
|
+
|
68
|
+
<small>Cowtech::Extensions::TimeZone::ClassMethods</small>
|
69
|
+
|
70
|
+
</li>
|
71
|
+
|
72
|
+
|
57
73
|
<li class="r2 ">
|
58
74
|
<span class='object_link'><a href="Cowtech/Extensions/Pathname.html#components-instance_method" title="Cowtech::Extensions::Pathname#components (method)">#components</a></span>
|
59
75
|
|
@@ -191,17 +207,17 @@
|
|
191
207
|
|
192
208
|
|
193
209
|
<li class="r1 ">
|
194
|
-
<span class='object_link'><a href="Cowtech/Extensions/
|
210
|
+
<span class='object_link'><a href="Cowtech/Extensions/Object.html#format_number-instance_method" title="Cowtech::Extensions::Object#format_number (method)">#format_number</a></span>
|
195
211
|
|
196
|
-
<small>Cowtech::Extensions::
|
212
|
+
<small>Cowtech::Extensions::Object</small>
|
197
213
|
|
198
214
|
</li>
|
199
215
|
|
200
216
|
|
201
217
|
<li class="r2 ">
|
202
|
-
<span class='object_link'><a href="Cowtech/Extensions/
|
218
|
+
<span class='object_link'><a href="Cowtech/Extensions/Settings.html#format_number-instance_method" title="Cowtech::Extensions::Settings#format_number (method)">#format_number</a></span>
|
203
219
|
|
204
|
-
<small>Cowtech::Extensions::
|
220
|
+
<small>Cowtech::Extensions::Settings</small>
|
205
221
|
|
206
222
|
</li>
|
207
223
|
|
@@ -535,7 +551,7 @@
|
|
535
551
|
|
536
552
|
|
537
553
|
<li class="r2 ">
|
538
|
-
<span class='object_link'><a href="Cowtech/Extensions/TimeZone.html#
|
554
|
+
<span class='object_link'><a href="Cowtech/Extensions/TimeZone.html#to_str-instance_method" title="Cowtech::Extensions::TimeZone#to_str (method)">#to_str</a></span>
|
539
555
|
|
540
556
|
<small>Cowtech::Extensions::TimeZone</small>
|
541
557
|
|
@@ -543,7 +559,7 @@
|
|
543
559
|
|
544
560
|
|
545
561
|
<li class="r1 ">
|
546
|
-
<span class='object_link'><a href="Cowtech/Extensions/TimeZone.html#
|
562
|
+
<span class='object_link'><a href="Cowtech/Extensions/TimeZone.html#to_str_parameterized-instance_method" title="Cowtech::Extensions::TimeZone#to_str_parameterized (method)">#to_str_parameterized</a></span>
|
547
563
|
|
548
564
|
<small>Cowtech::Extensions::TimeZone</small>
|
549
565
|
|
@@ -551,7 +567,7 @@
|
|
551
567
|
|
552
568
|
|
553
569
|
<li class="r2 ">
|
554
|
-
<span class='object_link'><a href="Cowtech/Extensions/TimeZone.html#
|
570
|
+
<span class='object_link'><a href="Cowtech/Extensions/TimeZone.html#to_str_with_dst-instance_method" title="Cowtech::Extensions::TimeZone#to_str_with_dst (method)">#to_str_with_dst</a></span>
|
555
571
|
|
556
572
|
<small>Cowtech::Extensions::TimeZone</small>
|
557
573
|
|
@@ -559,6 +575,14 @@
|
|
559
575
|
|
560
576
|
|
561
577
|
<li class="r1 ">
|
578
|
+
<span class='object_link'><a href="Cowtech/Extensions/TimeZone.html#to_str_with_dst_parameterized-instance_method" title="Cowtech::Extensions::TimeZone#to_str_with_dst_parameterized (method)">#to_str_with_dst_parameterized</a></span>
|
579
|
+
|
580
|
+
<small>Cowtech::Extensions::TimeZone</small>
|
581
|
+
|
582
|
+
</li>
|
583
|
+
|
584
|
+
|
585
|
+
<li class="r2 ">
|
562
586
|
<span class='object_link'><a href="Cowtech/Extensions/TimeZone/ClassMethods.html#unparameterize_zone-instance_method" title="Cowtech::Extensions::TimeZone::ClassMethods#unparameterize_zone (method)">#unparameterize_zone</a></span>
|
563
587
|
|
564
588
|
<small>Cowtech::Extensions::TimeZone::ClassMethods</small>
|
@@ -566,7 +590,7 @@
|
|
566
590
|
</li>
|
567
591
|
|
568
592
|
|
569
|
-
<li class="
|
593
|
+
<li class="r1 ">
|
570
594
|
<span class='object_link'><a href="Cowtech/Extensions/DateTime/ClassMethods.html#unparameterize_zone-instance_method" title="Cowtech::Extensions::DateTime::ClassMethods#unparameterize_zone (method)">#unparameterize_zone</a></span>
|
571
595
|
|
572
596
|
<small>Cowtech::Extensions::DateTime::ClassMethods</small>
|
@@ -574,7 +598,7 @@
|
|
574
598
|
</li>
|
575
599
|
|
576
600
|
|
577
|
-
<li class="
|
601
|
+
<li class="r2 ">
|
578
602
|
<span class='object_link'><a href="Cowtech/Extensions/String.html#untitleize-instance_method" title="Cowtech::Extensions::String#untitleize (method)">#untitleize</a></span>
|
579
603
|
|
580
604
|
<small>Cowtech::Extensions::String</small>
|
@@ -582,7 +606,7 @@
|
|
582
606
|
</li>
|
583
607
|
|
584
608
|
|
585
|
-
<li class="
|
609
|
+
<li class="r1 ">
|
586
610
|
<span class='object_link'><a href="Cowtech/Extensions/TimeZone.html#uses_dst%3F-instance_method" title="Cowtech::Extensions::TimeZone#uses_dst? (method)">#uses_dst?</a></span>
|
587
611
|
|
588
612
|
<small>Cowtech::Extensions::TimeZone</small>
|
@@ -590,7 +614,7 @@
|
|
590
614
|
</li>
|
591
615
|
|
592
616
|
|
593
|
-
<li class="
|
617
|
+
<li class="r2 ">
|
594
618
|
<span class='object_link'><a href="Cowtech/Extensions/DateTime.html#utc_time-instance_method" title="Cowtech::Extensions::DateTime#utc_time (method)">#utc_time</a></span>
|
595
619
|
|
596
620
|
<small>Cowtech::Extensions::DateTime</small>
|
@@ -598,7 +622,7 @@
|
|
598
622
|
</li>
|
599
623
|
|
600
624
|
|
601
|
-
<li class="
|
625
|
+
<li class="r1 ">
|
602
626
|
<span class='object_link'><a href="Cowtech/Extensions/Boolean.html#value-instance_method" title="Cowtech::Extensions::Boolean#value (method)">#value</a></span>
|
603
627
|
|
604
628
|
<small>Cowtech::Extensions::Boolean</small>
|
@@ -606,7 +630,7 @@
|
|
606
630
|
</li>
|
607
631
|
|
608
632
|
|
609
|
-
<li class="
|
633
|
+
<li class="r2 ">
|
610
634
|
<span class='object_link'><a href="Cowtech/Extensions/String.html#value-instance_method" title="Cowtech::Extensions::String#value (method)">#value</a></span>
|
611
635
|
|
612
636
|
<small>Cowtech::Extensions::String</small>
|
@@ -614,7 +638,7 @@
|
|
614
638
|
</li>
|
615
639
|
|
616
640
|
|
617
|
-
<li class="
|
641
|
+
<li class="r1 ">
|
618
642
|
<span class='object_link'><a href="Cowtech/Extensions/DateTime/ClassMethods.html#years-instance_method" title="Cowtech::Extensions::DateTime::ClassMethods#years (method)">#years</a></span>
|
619
643
|
|
620
644
|
<small>Cowtech::Extensions::DateTime::ClassMethods</small>
|