module RawDateDetector

Constants

VERSION

Public Class Methods

raw_arr(input) click to toggle source
# File lib/raw_date_detector.rb, line 5
def self.raw_arr(input)
  year_arr = input.to_s.split('').map { |digit| digit.to_i }
end
raw_year?(input) click to toggle source
# File lib/raw_date_detector.rb, line 9
def self.raw_year?(input)
  year_arr = raw_arr(input)
  first_section = year_arr[0] + year_arr[1]
  second_section = year_arr[2] + year_arr[3]
  first_section / second_section == 1 ? true : false
end