diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-11-26 16:00:52 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-11-26 16:00:52 -0500 |
commit | 04ff67e26b880dde8bfb6462f312cf434457cd46 (patch) | |
tree | a3961289cbe8c60ca524490df1716229c555b379 /assets/js/core/utils.js | |
parent | e64faae69aec404b2641b8ae281afe20806e8292 (diff) |
Rewrite task move position component and remove Vuejs
Diffstat (limited to 'assets/js/core/utils.js')
-rw-r--r-- | assets/js/core/utils.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/assets/js/core/utils.js b/assets/js/core/utils.js new file mode 100644 index 00000000..7d631526 --- /dev/null +++ b/assets/js/core/utils.js @@ -0,0 +1,13 @@ +KB.utils.formatDuration = function (d) { + if (d >= 86400) { + return Math.round(d/86400) + "d"; + } + else if (d >= 3600) { + return Math.round(d/3600) + "h"; + } + else if (d >= 60) { + return Math.round(d/60) + "m"; + } + + return d + "s"; +}; |