[New] Added formatDateTimeDashIfEmpty()

This commit is contained in:
Robert von Burg 2022-06-22 08:36:40 +02:00
parent 7027da5b14
commit 11e0dcfe67
Signed by: eitch
GPG Key ID: 75DB9C85C74331F7
2 changed files with 6 additions and 1 deletions

View File

@ -1,7 +1,7 @@
{
"name": "strolch-wc-util-behavior",
"description": "Strolch Polymer Util Behaviors",
"version": "0.3.4",
"version": "0.3.5",
"authors": [
"Robert von Burg"
],

View File

@ -294,6 +294,11 @@
//
// Date Time functions
//
formatDateTimeDashIfEmpty: function (string) {
if (string == null || string === "" || string === "-" || string === "1970-01-01T01:00:00+01:00")
return "-";
return Strolch.toLocalDateTime(string);
},
formatDateTime: function (string) {
return Strolch.toLocalDateTime(string);
},