gluxon / DriverStation.js

An open source alternative FRC Driver Station
Mozilla Public License 2.0
35 stars 5 forks source link

Improve elapsed time formatting #3

Open gluxon opened 11 years ago

gluxon commented 11 years ago

Currently, the elapsed time formatting function goes through number, to string, to number, and to string conversions. There should be a better way to do this. It does work for now though, and at the speed needed.

bored-engineer commented 11 years ago

One option is http://momentjs.com/

gluxon commented 11 years ago

moment.js is awesome in how it formats the current time, but I couldn't get it to format elapsed time the way I wanted. Maybe I missed something though. I will most likely check it out again in the future.