From 396b0cd58f379c742eb91c8d290d0eb59d4c1060 Mon Sep 17 00:00:00 2001 From: overflowerror Date: Fri, 8 Aug 2014 14:22:18 +0200 Subject: [PATCH] added function for leading zeros in dates --- data/scripts/miscellaneous.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/scripts/miscellaneous.js b/data/scripts/miscellaneous.js index 19e4a0c..717555c 100644 --- a/data/scripts/miscellaneous.js +++ b/data/scripts/miscellaneous.js @@ -17,6 +17,10 @@ var ret = function(value) { return value; } +function pad(n) { + return n < 10 ? '0' + n : n; +} + var isInteger = function(i) { return (parseInt(i) + "" == i); }