Template:DiscordSnowflakeTime: Difference between revisions

From WormRP
Jump to navigation Jump to search
Keira (talk | contribs)
Created page with "{{#time: r | @{{#expr:(({{{snowflake}}}/ (2^22)) + 1420070400000) / 1000 round 0}}}}"
 
Keira (talk | contribs)
m i guess this doesnt work
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#time: r | @{{#expr:(({{{snowflake}}}/ (2^22)) + 1420070400000) / 1000 round 0}}}}
<noinclude>
 
Usage: <code><nowiki>{{DiscordSnowflakeTime|{{#explode:DISCORD SHARE URL|/|-1}}}}</nowiki></code>
 
note that these times might be off by like a second either way, due to probably rounding errors. Could probably be fixed by turning the pseudo-bitshift into a nested expr with its own rounding down? idk.
 
</noinclude><includeonly>{{#time: U | @{{#expr:(({{{1}}}/ (2^22)) + 1420070400000) / 1000 round 0}}}}</includeonly>

Latest revision as of 10:02, 9 March 2020


Usage: {{DiscordSnowflakeTime|{{#explode:DISCORD SHARE URL|/|-1}}}}

note that these times might be off by like a second either way, due to probably rounding errors. Could probably be fixed by turning the pseudo-bitshift into a nested expr with its own rounding down? idk.