Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2021-10-01 00:40:16 +0300
committerdartcafe <github@dartcafe.de>2021-10-01 00:40:16 +0300
commit633a7049af71cd0c71edaac685685d79691f18d7 (patch)
treec9d5605b27d682f9cd522e50878e979ba6836986 /src/js/components/Options
parentb5c29104db0a6b6c5e090e88b167b9ec546e5b36 (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.vue10
-rw-r--r--src/js/components/Options/OptionsDateAdd.vue6
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) {