class Stockboy::Translations::USDate
Translates numeric dates provided in US (MDY) order
Priority is given to middle-endian (US) order:
-
MM-DD-YYYY
-
MM-DD-YY
-
MM/DD/YYYY
-
MM/DD/YY
Job
template DSL
¶ ↑
Registered as :us_date
. Use with:
attributes do check_in as: :us_date end
@example
date = Stockboy::Translator::USDate.new record.check_in = "2-1-12" date.translate(record, :check_in) # => #<Date 2012-02-01>