<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ATwitterSnowflake%2Fdoc</id>
	<title>Module:TwitterSnowflake/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ATwitterSnowflake%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:TwitterSnowflake/doc&amp;action=history"/>
	<updated>2026-04-21T16:27:17Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:TwitterSnowflake/doc&amp;diff=147382&amp;oldid=prev</id>
		<title>imported&gt;Frietjes: /* See also */</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:TwitterSnowflake/doc&amp;diff=147382&amp;oldid=prev"/>
		<updated>2021-05-10T16:09:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;See also&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Module rating|release}}&lt;br /&gt;
{{Module rating|protected}}&lt;br /&gt;
{{high use}}&lt;br /&gt;
{{Lua sidebar}}&lt;br /&gt;
This is a Lua module to translate [[Snowflake ID|snowflakes]] from platforms such as [[Twitter]] and [[Discord (software)|Discord]] to timestamps. This can be used for automatically generating dates for templates like {{t|cite tweet}}.&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
There is one required parameter: {{para|id_str}}, which must be the snowflake ID of the tweet. For example, &amp;lt;code&amp;gt;1345021162959503360&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:TwitterSnowflake|snowflakeToDate|id_str=1345021162959503360}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; returns {{#invoke:TwitterSnowflake|snowflakeToDate|id_str=1345021162959503360}}.&lt;br /&gt;
&lt;br /&gt;
To specify the date format, use {{para|format}}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:TwitterSnowflake|snowflakeToDate|id_str=1345021162959503360|format=%e %B %Y}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; returns {{#invoke:TwitterSnowflake|snowflakeToDate|id_str=1345021162959503360|format=%e %B %Y}} — useful to specify, especially for use in [[Help:CS1|CS1 citations]], in case the default date format would change in the future (though unlikely).&lt;br /&gt;
&lt;br /&gt;
====Custom epoch====&lt;br /&gt;
&lt;br /&gt;
By default, the [[epoch]] used is that of Twitter. To specify a different epoch, such as that of Twitter, use {{para|epoch}}. The epoch of Discord is &amp;lt;code&amp;gt;1420070400&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:TwitterSnowflake|snowflakeToDate|id_str=797545051047460888|epoch=1420070400}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; returns {{#invoke:TwitterSnowflake|snowflakeToDate|id_str=797545051047460888|epoch=1420070400}}.&lt;br /&gt;
&lt;br /&gt;
===See also===&lt;br /&gt;
*[[Template:TwitterSnowflake]]&lt;br /&gt;
*[[Template:Cite tweet]]&lt;br /&gt;
*[[Snowflake ID]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Frietjes</name></author>
	</entry>
</feed>