Time tag |
I've added a time tag that displays a timestamp in the local timezone of each user. For example, the time of the next game update after this post is:
Use like this:
The following 6 users Like Roavin's post:
• Amerion, Apatosaurus, Jay Coop, Moon, Pronoun, Purple Hyacinth
"Fri Jan 07 2022 21:00:00 GMT-0800 (Pacific Standard Time)" seems like a bit much for me. Is there any way to abbreviate the timezone to something to PST and have GMT replaced by UTC (UTC being a time standard instead of a timezone) and that itself placed after the timezone like ""Fri Jan 07 2022 21:00:00 PST (UTC−08:00)"". I hope that's not asking for too much, just a matter of order and aesthetics.
I don't know if it would be feasible to switch the order of the day and month? I'm thinking that something like 01 Jan 2022 would be easier to read than Jan 01 2022. I also second what Jay said in their post above.
Former Delegate of the South Pacific
Posts outside High Court venues should be taken as those of any other legislator. I do not participate in the regional server, but I am happy to talk through instant messaging or on the forum. Legal Resources: THE MATT-DUCK Law Archive | Mavenu Diplomatic Archive | Rules of the High Court | Case Submission System | Online Rulings Consultation System
I whipped this up in 10 minutes, so right now the output format is simply what your local browser does by default when printing a Date-object. Certainly I can look into customizing that, though I'll need to familiarize myself with the browser i18n APIs first.
This still does not work on all themes. Pls fix.
"After he realizes this newfound power of his to override the hopes and dreams of republicans, he puts all of the united provinces under his control."
one time minister of culture
Looks like it was fixed. Thanks.
"After he realizes this newfound power of his to override the hopes and dreams of republicans, he puts all of the united provinces under his control."
one time minister of culture (01-08-2022, 06:02 PM)Kris Kringle Wrote: I don't know if it would be feasible to switch the order of the day and month? I'm thinking that something like 01 Jan 2022 would be easier to read than Jan 01 2022. I also second what Jay said in their post above. Don't mean to gravedig, but seeing as this seems like it's still up in the air: Code: elm.text(date.toString()); could perhaps be replaced with something similar to Code: elm.text(date.toLocaleString(navigator.language, {timeZoneName: "short"})); Date.prototype.toLocaleString() on MDN | options object fields on MDN (01-16-2022, 12:25 PM)im_a_waffle1 Wrote: This still does not work on all themes. Pls fix. Just speculation — I may be mistaken, but it seems the JavaScript for the BBcode is only inside a $(document).ready() call, so the code is not actually triggered for the user when using the quick reply or quick edit features that don't refresh the page. This would explain why the issue seemed to fix itself since the issue goes way upon reloading or navigating to another page, and doesn't appear if any other user visits the page. |
Users browsing this thread: |
1 Guest(s) |