lib/date/format.rb in rubysl-date-2.0.8 vs lib/date/format.rb in rubysl-date-2.0.9

- old
+ new

@@ -230,12 +230,12 @@ s, w, c = $1, $2, $3 if s s.scan(/./) do |k| case k when '-'; f[:p] = '-' - when '_'; f[:p] = "\s" - when '0'; f[:p] = '0' + when '_'; f[:p] = "\s" unless f[:p] == '-' + when '0'; f[:p] = '0' unless f[:p] == '-' when '^'; f[:u] = true when '#'; f[:x] = true end end end @@ -557,11 +557,11 @@ return unless (0..99) === val e.year = val e._cent ||= if val >= 69 then 19 else 20 end when 'Z', /\A:{0,3}z/ return unless str.sub!(/\A((?:gmt|utc?)?[-+]\d+(?:[,.:]\d+(?::\d+)?)? - |(?-i:[[:alpha:].\\s]+)(?:standard|daylight)\\stime\\b - |(?-i:[[:alpha:]]+)(?:\\sdst)?\\b + |(?-i:[[:alpha:].\s]+)(?:standard|daylight)\stime\b + |(?-i:[[:alpha:]]+)(?:\sdst)?\b )/ix, '') val = $1 e.zone = val offset = zone_to_diff(val) e.offset = offset