class ICalPal::Event
def in_window?(s, e)
-
(Boolean)
-
Parameters:
-
e
(RDT
) -- Event end -
s
(RDT
) -- Event start
def in_window?(s, e) if $opts[:now] if ($now >= s && $now < e) $log.debug("now: #{s} to #{e} vs. #{$now}") true else $log.debug("not now: #{s} to #{e} vs. #{$now}") false end elsif ([ s, e ].max >= $opts[:from] && s < $opts[:to]) $log.debug("in window: #{s} to #{e} vs. #{$opts[:from]} to #{$opts[:to]}") true else $log.debug("not in window: #{s} to #{e} vs. #{$opts[:from]} to #{$opts[:to]}") false end end