We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1b93e33 commit 3ccdb42Copy full SHA for 3ccdb42
lib/chronic/parser.rb
@@ -93,7 +93,7 @@ def parse(text)
93
# Returns a new String ready for Chronic to parse.
94
def pre_normalize(text)
95
text = text.to_s.downcase
96
- text.gsub!(/\b(\d{2})\.(\d{2})\.(\d{4})\b/, '\3 / \2 / \1')
+ text.gsub!(/\b(\d{1,2})\.(\d{1,2})\.(\d{4})\b/, '\3 / \2 / \1')
97
text.gsub!(/\b([ap])\.m\.?/, '\1m')
98
text.gsub!(/(\s+|:\d{2}|:\d{2}\.\d{3})\-(\d{2}:?\d{2})\b/, '\1tzminus\2')
99
text.gsub!(/\./, ':')
0 commit comments