diff --git a/quest/static/quest.js b/quest/static/quest.js index 0fab0cc..74cbefa 100644 --- a/quest/static/quest.js +++ b/quest/static/quest.js @@ -177,7 +177,11 @@ function submitWritein(post_id) { /* Helpers */ function padToTwo(number) { - if (number<=99) { number = ("0"+number).slice(-2); } + if (number >= 0) { + if (number < 10) { number = "0" + number; } + } else { + if (number > -10) { number = "-0" + -1*number; } + } return number; } function strftime(date) {