Commit b280061d authored by Andrew's avatar Andrew
Browse files

"preprocessing_editions()" sorting dates in correct order

parent 8093d3d2
......@@ -99,8 +99,8 @@ module Jekyll
site.data["courses"].each do |n, v|
# checks begins and ends values
if !v["begin"] or !v["ends"]
# retrieves dates from schedule
dates = v["schedule"].map { |s| s["date"] }.select { |d| d != nil }.map { |d| DateTime.parse(d) }.sort
# retrieves dates from schedule
dates = v["schedule"].map { |s| s["date"] }.select { |d| d != nil }.map { |d| DateTime.parse(d) }.reverse
# if schedule dates are set they are used for update begins and ends
if dates.size != 0
......@@ -160,4 +160,4 @@ module Jekyll
self.process(@name)
end
end
end
\ No newline at end of file
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment