Displaying 4 results from an estimated 4 matches for "day_label".
Did you mean:
add_label
2009 Jul 06
0
[PATCH server] UI for accumulated uptime for VMs. (revised2)
...input_int = input_num.to_i
+ hours_to_seconds = [input_int/3600 % 24,
+ input_int/60 % 60,
+ input_int % 60].map{|t| t.to_s.rjust(2,'0')}.join(':')
+ days = input_int / 86400
+ day_str = ""
+ if days > 0
+ day_label = (days > 1) ? "days" : "day"
+ day_str = "#{days} #{day_label} "
+ end
+ day_str + hours_to_seconds
+ end
end
diff --git a/src/app/models/vm.rb b/src/app/models/vm.rb
index d4696cf..f0eaf94 100644
--- a/src/app/models/vm.rb
+++ b/src/app/models/vm.rb
@...
2009 Jul 02
1
[PATCH server] UI for accumulated uptime for VMs. (revised)
...input_int = input_num.to_i
+ hours_to_seconds = [input_int/3600 % 24,
+ input_int/60 % 60,
+ input_int % 60].map{|t| t.to_s.rjust(2,'0')}.join(':')
+ days = input_int / 86400
+ day_str = ""
+ if days > 0
+ day_label = (days > 1) ? "days" : "day"
+ day_str = "#{days} #{day_label} "
+ end
+ day_str + hours_to_seconds
+ end
end
diff --git a/src/app/models/vm.rb b/src/app/models/vm.rb
index d4696cf..f0eaf94 100644
--- a/src/app/models/vm.rb
+++ b/src/app/models/vm.rb
@...
2009 Jul 06
2
[PATCH server] UI for accumulated uptime for VMs. (revised3)
...input_int = input_num.to_i
+ hours_to_seconds = [input_int/3600 % 24,
+ input_int/60 % 60,
+ input_int % 60].map{|t| t.to_s.rjust(2,'0')}.join(':')
+ days = input_int / 86400
+ day_str = ""
+ if days > 0
+ day_label = (days > 1) ? "days" : "day"
+ day_str = "#{days} #{day_label} "
+ end
+ day_str + hours_to_seconds
+ end
end
diff --git a/src/app/models/vm.rb b/src/app/models/vm.rb
index d4696cf..6d0f864 100644
--- a/src/app/models/vm.rb
+++ b/src/app/models/vm.rb
@...
2009 Jun 29
3
[PATCH server] UI for accumulated uptime for VMs.
...input_int = input_num.to_i
+ hours_to_seconds = [input_int/3600 % 24,
+ input_int/60 % 60,
+ input_int % 60].map{|t| t.to_s.rjust(2,'0')}.join(':')
+ days = input_int / 86400
+ day_str = ""
+ if days > 0
+ day_label = (days > 1) ? "days" : "day"
+ day_str = "#{days} #{day_label} "
+ end
+ day_str + hours_to_seconds
+ end
end
diff --git a/src/app/models/vm.rb b/src/app/models/vm.rb
index 1a57a14..355ce6d 100644
--- a/src/app/models/vm.rb
+++ b/src/app/models/vm.rb
@...