zero pad minutes

This commit is contained in:
Justin Palmer
2013-01-30 10:14:26 -08:00
parent 1afb2fbeb5
commit 164b50d795

View File

@@ -22,7 +22,9 @@ class EditorStatsView extends ScrollView
.orient('top')
.tickFormat (d) ->
d = new Date(startDate.getTime() + (d * 6e4))
"#{d.getHours()}:#{d.getMinutes()}"
mins = d.getMinutes()
mins = "0#{mins}" if mins < 9
"#{d.getHours()}:#{mins}"
@activate: (rootView, state) ->
@instance = new EditorStatsView(rootView, state?.eventLog)