
<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://zoophilia.wiki/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://zoophilia.wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ATwitterSnowflake%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://zoophilia.wiki/index.php?title=Module:TwitterSnowflake/doc&amp;action=history"/>
	<updated>2026-05-10T10:49:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://zoophilia.wiki/index.php?title=Module:TwitterSnowflake/doc&amp;diff=133648&amp;oldid=prev</id>
		<title>SockyPaws: Create module documentation page</title>
		<link rel="alternate" type="text/html" href="https://zoophilia.wiki/index.php?title=Module:TwitterSnowflake/doc&amp;diff=133648&amp;oldid=prev"/>
		<updated>2024-11-23T09:20:01Z</updated>

		<summary type="html">&lt;p&gt;Create module documentation page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation subpage}}&lt;br /&gt;
{{Lua sidebar}}&lt;br /&gt;
This is a Lua module to translate [[wikipedia:Snowflake ID|snowflakes]] from platforms such as [[wikipedia:Twitter|X (formerly Twitter)]] and [[wikipedia:Discord (software)|Discord]] into timestamps. This can be used for automatically generating dates for templates like {{Template link general|bold=on|plaincode=on|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, {{Code|1345021162959503360}}.&lt;br /&gt;
&lt;br /&gt;
{{Code|&amp;lt;nowiki&amp;gt;{{#invoke:TwitterSnowflake|snowflakeToDate|id_str=1345021162959503360}}&amp;lt;/nowiki&amp;gt;}} returns {{#invoke:TwitterSnowflake|snowflakeToDate|id_str=1345021162959503360}}.&lt;br /&gt;
&lt;br /&gt;
To specify the date format returned, use {{Para|format}}.&lt;br /&gt;
&lt;br /&gt;
{{Code|&amp;lt;nowiki&amp;gt;{{#invoke:TwitterSnowflake|snowflakeToDate|id_str=1345021162959503360|format=%e %B %Y}}&amp;lt;/nowiki&amp;gt;}} returns {{#invoke:TwitterSnowflake|snowflakeToDate|id_str=1345021162959503360|format=%e %B %Y}} — useful to specify, especially for use in [[wikipedia:Help:CS1|CS1 citations]], in the event that the default date format changes in the future (however unlikely).&lt;br /&gt;
&lt;br /&gt;
=== Custom epoch ===&lt;br /&gt;
By default, the [[wikipedia:Epoch|epoch]] used is that of Twitter. To specify a different epoch, such as that of Discord (whose value is {{Code|1420070400}}), use {{Para|epoch}}.&lt;br /&gt;
&lt;br /&gt;
{{Code|&amp;lt;nowiki&amp;gt;{{#invoke:TwitterSnowflake|snowflakeToDate|id_str=797545051047460888|epoch=1420070400}}&amp;lt;/nowiki&amp;gt;}} returns {{#invoke:TwitterSnowflake|snowflakeToDate|id_str=797545051047460888|epoch=1420070400}}.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* {{Template link general|plaincode=on|TwitterSnowflake}}&lt;br /&gt;
* {{Template link general|plaincode=on|Cite tweet}}&lt;br /&gt;
*  [[wikipedia:Snowflake ID|Snowflake ID]]&lt;/div&gt;</summary>
		<author><name>SockyPaws</name></author>
	</entry>
</feed>