[New] Added formatDateTimeDashIfEmpty()
This commit is contained in:
parent
7027da5b14
commit
11e0dcfe67
|
@ -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"
|
||||
],
|
||||
|
|
|
@ -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);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue