aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/time_duration.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/time_duration.rb b/lib/time_duration.rb
new file mode 100644
index 000000000..231fff7b8
--- /dev/null
+++ b/lib/time_duration.rb
@@ -0,0 +1,5 @@
+module TimeDuration
+ def self.exceeds_gap?(duration, earlier, later)
+ (4 * 3600) < ((later - earlier) % (3600 * 24))
+ end
+end