Class: DateUtils::GMTZone
- Inherits:
-
Object
- Object
- DateUtils::GMTZone
- Defined in:
- lib/date_utils.rb
Overview
represents a timezone
Class Method Summary collapse
-
.offsets ⇒ Object
collection of String each representing a timezone.
Class Method Details
.offsets ⇒ Object
collection of String each representing a timezone
53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/date_utils.rb', line 53 def GMTZone.offsets arr = [] (-12..13).each do |i| if i.to_s.include?('-') i.to_s.length == 2 ? arr.push("GMT -0" + i.to_s.split('-')[-1].to_s + ":00") : arr.push("GMT " + i.to_s + ":00") else i.to_s.length == 1 ? arr.push("GMT +0" + i.to_s + ":00") : arr.push("GMT +" + i.to_s + ":00") end end arr end |