mirror of
https://github.com/wanderer-industries/wanderer
synced 2025-12-11 18:26:04 +00:00
Initial commit
This commit is contained in:
11
assets/js/hooks/clientTime.ts
Normal file
11
assets/js/hooks/clientTime.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export default {
|
||||
mounted() {
|
||||
this.updated();
|
||||
},
|
||||
updated() {
|
||||
const dt = new Date(Number(this.el.textContent));
|
||||
const options = { hour12: false, timeZone: 'UTC' };
|
||||
this.el.textContent = `${dt.toLocaleString('en-US', options)}`;
|
||||
this.el.classList.remove('invisible');
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user