aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/events.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/events.rb b/lib/events.rb
index e647930..de9af64 100644
--- a/lib/events.rb
+++ b/lib/events.rb
@@ -21,6 +21,10 @@ module Events
@start_time.to_date
end
+ def end_time
+ @start_time + @duration
+ end
+
def slug
"#{start_time.to_i}-#{title.downcase.gsub(/[^a-z0-9_-]/, '')}"
end