[New] Added formatDateDashIfEmpty()
This commit is contained in:
parent
11e0dcfe67
commit
61768b5cad
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "strolch-wc-util-behavior",
|
||||
"description": "Strolch Polymer Util Behaviors",
|
||||
"version": "0.3.5",
|
||||
"version": "0.3.6",
|
||||
"authors": [
|
||||
"Robert von Burg"
|
||||
],
|
||||
|
|
|
@ -302,6 +302,14 @@
|
|||
formatDateTime: function (string) {
|
||||
return Strolch.toLocalDateTime(string);
|
||||
},
|
||||
formatDateDashIfEmpty: function (string) {
|
||||
if (string == null || string === "" || string === "-" || string === "1970-01-01T01:00:00+01:00")
|
||||
return "-";
|
||||
return Strolch.toLocalDate(string);
|
||||
},
|
||||
formatDate: function (string) {
|
||||
return Strolch.toLocalDate(string);
|
||||
},
|
||||
parsePeriodUnit: function (p) {
|
||||
|
||||
// P3M -> months
|
||||
|
|
Loading…
Reference in New Issue