Sha256: 4e2724c096a25ee3cd263cec91f6d34b13f68fea58c0ce2916194c30d3d14479
Contents?: true
Size: 514 Bytes
Versions: 6
Compression:
Stored size: 514 Bytes
Contents
# --- Fix Chronic - can't parse '12th Jan' --- # begin require 'chronic' module Chronic class << self def parse_with_hobo_fix(s) parse_without_hobo_fix(if s =~ /^\s*\d+\s*(st|nd|rd|th)\s+[a-zA-Z]+(\s+\d+)?\s*$/ s.sub(/\s*\d+(st|nd|rd|th)/) {|s| s[0..-3]} else s end) end alias_method_chain :parse, :hobo_fix end end rescue LoadError; end
Version data entries
6 entries across 6 versions & 2 rubygems