Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (10 sloc) 282 Bytes
module PagesHelper
def parse_date(when_field)
# grab the first line
when_field = when_field.to_s.split("\n").first
# remove the when:
when_field.gsub!(/^When:\ /, '')
when_field = when_field.split(" to ").first
Date.parse(when_field)
end
end
Something went wrong with that request. Please try again.