We've moved, ! Update your bookmarks to https://thesouthpacific.org! These forums are being archived.

Dismiss this notice
See LegComm's announcement to make sure you're still a legislator on the new forums!

Time tag
#1

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:
  • Create yourself a unix timestamp; you can use a tool like this one
  • In your post, add
    Code:
    [time]<myunixtimestamp>[/time]
  • ???
  • Profit!
[Image: XXPV74Y.png?1]
[-] The following 6 users Like Roavin's post:
  • Amerion, Apatosaurus, Jay Coop, Moon, Pronoun, Purple Hyacinth
Reply
#2

"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.
4× Cabinet minister /// 1× OWL director /// CRS member /// SPSF

My History
Reply
#3

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
Reply
#4

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.
[Image: XXPV74Y.png?1]
Reply
#5

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

[Image: rank_trainee.min.svg] [Image: updates_lifetime_1.min.svg] [Image: detags_lifetime_2.min.svg]
Reply
#6

(01-16-2022, 12:25 PM)im_a_waffle1 Wrote: This still does not work on all themes. Pls fix.

If you're going to make bug reports, please be more specific. Which themes? have you cleared your browser cache first?
Reply
#7

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

[Image: rank_trainee.min.svg] [Image: updates_lifetime_1.min.svg] [Image: detags_lifetime_2.min.svg]
Reply
#8

(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.
[Image: flag%20of%20esfalsa%20animated.svg] Esfalsa | NationStatesWiki | Roleplay | Discord

[Image: rank_officer.min.svg] [Image: updates_lifetime_2.min.svg] [Image: defenses_lifetime_4.min.svg] [Image: detags_lifetime_3.min.svg]
Reply




Users browsing this thread:
1 Guest(s)





Theme © iAndrew 2018 Forum software by © MyBB .