Move field start_date to date
This commit is contained in:
parent
31f48e1683
commit
e2a7d20a3f
|
@ -66,14 +66,14 @@ def get_events(git, source_dir, categories)
|
|||
cleanup_and_clone('events', clone_target, git, 'master')
|
||||
event_categories.each do |category|
|
||||
category_events = YAML::load_file(clone_target + '/' + category + '.yml')
|
||||
category_events_sorted = category_events.sort_by { |k| k['start_date'] }
|
||||
category_events_sorted = category_events.sort_by { |k| k['date'] }
|
||||
events << category_events_sorted[0]
|
||||
end
|
||||
|
||||
events_sorted = events.sort_by { |k| k['start_date']}
|
||||
events_sorted = events.sort_by { |k| k['date']}
|
||||
|
||||
events_sorted.each do |k|
|
||||
k['start_date'] = Date::ABBR_MONTHNAMES[k['start_date'].month]
|
||||
k['date'] = Date::ABBR_MONTHNAMES[k['date'].month]
|
||||
end
|
||||
|
||||
return events_sorted
|
||||
|
|
Loading…
Reference in New Issue