aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/utils.js
diff options
context:
space:
mode:
authorEmiliano Ciavatta2020-09-16 15:57:23 +0000
committerEmiliano Ciavatta2020-09-16 15:57:23 +0000
commit7907dd6fa6702f79d1be9ef8e483fa5533869eb7 (patch)
tree4fda7da525d7a224797c8a0997b426d25201bdd8 /frontend/src/utils.js
parent53301d30b56e5c328baf73d3bc512dc3170e49ea (diff)
parenta77f2f97f1df204c663119fe8ccafb6f274cb634 (diff)
Merge branch 'develop' into feature/frontend
Diffstat (limited to 'frontend/src/utils.js')
-rw-r--r--frontend/src/utils.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/frontend/src/utils.js b/frontend/src/utils.js
index 26c10d3..7381f69 100644
--- a/frontend/src/utils.js
+++ b/frontend/src/utils.js
@@ -59,3 +59,8 @@ export function timestampToTime(timestamp) {
let seconds = "0" + d.getSeconds();
return hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2);
}
+
+export function timestampToDateTime(timestamp) {
+ let d = new Date(timestamp);
+ return d.toLocaleDateString() + " " + d.toLocaleTimeString();
+}