Skip to content
Snippets Groups Projects
Commit 3268a1e6 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

Fix event algorithm

parent f7f0b389
No related branches found
No related tags found
No related merge requests found
......@@ -82,13 +82,12 @@ class Communication::Website::Agenda::Event < ApplicationRecord
end
def present?
to_day.present? ? (from_day >= Date.today && to_day <= Date.today)
to_day.present? ? (Date.today >= from_day && Date.today <= to_day)
: from_day == Date.today
end
def archive?
to_day.present? ? to_day < Date.today
: from_day < Date.today
status == STATUS_ARCHIVE
end
# Un événement demain aura une distance de 1, comme un événement hier
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment