search for: parse_date_str

Displaying 1 result from an estimated 1 matches for "parse_date_str".

2011 May 25
1
rake task: uninitialized constant
I have this rake taks: CUSTOM_MONTHS = [nil, "GEN", "FEB", "MAR", "APR", "MAG", "GIU", "LUG", "AGO", "SET", "OTT", "NOV", "DIC"] def parse_date_string(date_string) begin day, month, year = date_string.split("-") Time.mktime(year, CUSTOM_MONTHS.index(month), day).strftime("%Y-%m-%d") rescue return nil end end namespace :import do desc ''import pericolanti'' task :pericolanti => :environment...