{{ timeZone | getCity }}
+{{ cityName }}
{{ date }}
{{ time }}
@@ -31,11 +31,10 @@ export default { if (this.options.format) return this.options.format; return navigator.language; }, - }, - filters: { - /* For a given time zone, return just the city name */ - getCity(timeZone) { - return timeZone.split('/')[1].replaceAll('_', ' '); + /* Get city name from time-zone, or return users custom city name */ + cityName() { + if (this.options.customCityName) return this.options.customCityName; + return this.timeZone.split('/')[1].replaceAll('_', ' '); }, }, methods: {