class Saringan::Parsers::Date

Constants

FORMAT
MATCHER

Public Class Methods

clean(value) click to toggle source
# File lib/saringan/parsers/date.rb, line 12
def clean(value)
  value.gsub(/^d\(|\)$/, '')
end
matcher() click to toggle source
# File lib/saringan/parsers/date.rb, line 22
def matcher
  MATCHER
end
parse(value) click to toggle source
# File lib/saringan/parsers/date.rb, line 16
def parse(value)
  cleaned = clean(value)
  ::Date.strptime(cleaned, FORMAT)
end
Also aliased as: to_proc
to_proc(value)
Alias for: parse