lib/rufus/otime.rb in rufus-scheduler-1.0.4 vs lib/rufus/otime.rb in rufus-scheduler-1.0.5
- old
+ new
@@ -266,10 +266,10 @@
# * :drop_seconds, if set to true, seconds and milliseconds will be trimmed
# from the result
#
def Rufus.to_duration_string (seconds, options={})
- return '0s' if seconds <= 0
+ return (options[:drop_seconds] ? '0m' : '0s') if seconds <= 0
h = to_duration_hash seconds, options
s = DU_KEYS.inject("") do |r, key|
count = h[key]