Browse Source

util time transform leading zero fix

all-modes
pbca26 8 years ago
parent
commit
a202a716c4
  1. 4
      react/src/util/time.js

4
react/src/util/time.js

@ -17,8 +17,8 @@ export function secondsToString(seconds) {
year = a.getFullYear(),
month = months[a.getMonth()],
date = a.getDate(),
hour = a.getHours(),
min = a.getMinutes(),
hour = a.getHours() < 10 ? '0' + a.getHours() : a.getHours(),
min = a.getMinutes() < 10 ? '0' + a.getMinutes() : a.getMinutes(),
sec = a.getSeconds(),
time = date + ' ' + month + ' ' + year + ' ' + hour + ':' + min + ':' + sec;

Loading…
Cancel
Save