diff options
author | dartcafe <github@dartcafe.de> | 2021-10-01 00:40:16 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2021-10-01 00:40:16 +0300 |
commit | 633a7049af71cd0c71edaac685685d79691f18d7 (patch) | |
tree | c9d5605b27d682f9cd522e50878e979ba6836986 /src/js/components/Options | |
parent | b5c29104db0a6b6c5e090e88b167b9ec546e5b36 (diff) |
use template literals instead of string concentation
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'src/js/components/Options')
-rw-r--r-- | src/js/components/Options/OptionItem.vue | 10 | ||||
-rw-r--r-- | src/js/components/Options/OptionsDateAdd.vue | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/js/components/Options/OptionItem.vue b/src/js/components/Options/OptionItem.vue index 69a0b3c8..02a2caeb 100644 --- a/src/js/components/Options/OptionItem.vue +++ b/src/js/components/Options/OptionItem.vue @@ -151,19 +151,19 @@ export default { } else if (this.event.dayLong && this.event.to.sameDay) { return this.event.from.date } else if (this.event.dayLong && !this.event.to.sameDay) { - return this.event.from.date + ' - ' + this.event.to.date + return `${this.event.from.date} - ${this.event.to.date}` } else if (this.event.to.sameDay) { - return this.event.from.dateTime + ' - ' + this.event.to.time + return `${this.event.from.dateTime} - ${this.event.to.time}` } - return this.event.from.dateTime + ' - ' + this.event.to.dateTime + return `${this.event.from.dateTime} - ${this.event.to.dateTime}` }, dateLocalFormatUTC() { if (this.option.duration) { - return this.event.from.utc + ' - ' + this.event.to.utc + ' UTC' + return `${this.event.from.utc} - ${this.event.to.utc} UTC` } - return this.event.from.utc + ' UTC' + return `${this.event.from.utc} UTC` }, diff --git a/src/js/components/Options/OptionsDateAdd.vue b/src/js/components/Options/OptionsDateAdd.vue index 6aefebc1..2246c877 100644 --- a/src/js/components/Options/OptionsDateAdd.vue +++ b/src/js/components/Options/OptionsDateAdd.vue @@ -132,9 +132,9 @@ export default { if (this.useRange) { if (this.useTime) { if (moment(from).startOf('day').valueOf() === moment(to).startOf('day').valueOf()) { - text = from.format('ll LT') + ' - ' + to.format('LT') + text = `${from.format('ll LT')} - ${to.format('LT')}` } else { - text = from.format('ll LT') + ' - ' + to.format('ll LT') + text = `${from.format('ll LT')} - ${to.format('ll LT')}` } } else { from = from.startOf('day') @@ -142,7 +142,7 @@ export default { if (moment(from).startOf('day').valueOf() === moment(to).startOf('day').valueOf()) { text = from.format('ll') } else { - text = from.format('ll') + ' - ' + to.format('ll') + text = `${from.format('ll')} - ${to.format('ll')}` } } } else if (this.useTime) { |