public
Description: A fork of CyBot (http://repo.or.cz/w/six.git)
Homepage: http://wiki.macromates.com/Cybot/Cybot
Clone URL: git://github.com/kballard/six.git
Tidied up _format_time and fixed it to return '0 units' rather than '0 
unit'.
henrik (author)
Sat Jul 07 07:36:19 -0700 2007
Allan Odgaard (committer)
Sat Jul 07 11:07:36 -0700 2007
commit  66a8cb4f7581dee16189ac589b078e897cecdba7
tree    a49e49045f70a7dbd1d644a347221e3dc130b08b
parent  667304d97f72fbb0bac2d64cf4c96b63e9403922
...
365
366
367
368
369
 
 
370
371
372
...
365
366
367
 
 
368
369
370
371
372
0
@@ -365,8 +365,8 @@ class PluginBase
0
   end
0
 
0
   def _format_time(count, unit_name)
0
- number = count < X_TimeWords.length ? X_TimeWords[count-1] : count.to_s
0
- unit = unit_name + (count > 1 ? "s" : "")
0
+ number = X_TimeWords[count-1] || count.to_s
0
+ unit = unit_name + (count == 1 ? "" : "s")
0
     return number + " " + unit
0
   end
0
 

Comments

    No one has commented yet.