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