class Chronic::Scalar
def self.scan_for_years(token, post_token, options)
-
(ScalarYear, nil)
-
Parameters:
-
options
(Hash
) -- Options specified in {Chronic.parse} -
post_token
(Token
) -- -
token
(Token
) --
def self.scan_for_years(token, post_token, options) if token.word =~ /^([1-9]\d)?\d\d?$/ unless post_token && DAY_PORTIONS.include?(post_token.word) year = make_year(token.word.to_i, options[:ambiguous_year_future_bias]) return ScalarYear.new(year.to_i) end end end