<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.mechsploit.me/index.php?action=history&amp;feed=atom&amp;title=Module%3ADateI18n%2Fdoc</id>
	<title>Module:DateI18n/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.mechsploit.me/index.php?action=history&amp;feed=atom&amp;title=Module%3ADateI18n%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://wiki.mechsploit.me/index.php?title=Module:DateI18n/doc&amp;action=history"/>
	<updated>2026-04-08T16:27:22Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wiki.mechsploit.me/index.php?title=Module:DateI18n/doc&amp;diff=314&amp;oldid=prev</id>
		<title>MechsploWikiSysop: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.mechsploit.me/index.php?title=Module:DateI18n/doc&amp;diff=314&amp;oldid=prev"/>
		<updated>2025-09-02T02:50:21Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:50, 1 September 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>MechsploWikiSysop</name></author>
	</entry>
	<entry>
		<id>https://wiki.mechsploit.me/index.php?title=Module:DateI18n/doc&amp;diff=313&amp;oldid=prev</id>
		<title>mw&gt;Dexbot: Deprecating &lt;source&gt; tag: phab:T237267</title>
		<link rel="alternate" type="text/html" href="https://wiki.mechsploit.me/index.php?title=Module:DateI18n/doc&amp;diff=313&amp;oldid=prev"/>
		<updated>2020-05-30T09:51:50Z</updated>

		<summary type="html">&lt;p&gt;Deprecating &amp;lt;source&amp;gt; tag: &lt;a href=&quot;/index.php?title=Phab:T237267&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Phab:T237267 (page does not exist)&quot;&gt;phab:T237267&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;includeonly&amp;gt;{{Shared Template Warning|Module:DateI18n}}&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
This module is intended for creating of date strings in any language. It serves as a back-end of [[c:template:Date|Date]] template on Wikimedia Commons and it is being used by several other modules like [[d:Q20962109|Module:ISOdate]] or [[d:Q26905045|Module:Complex date]].&lt;br /&gt;
&lt;br /&gt;
== Using this module from templates ==&lt;br /&gt;
&lt;br /&gt;
=== Date ===&lt;br /&gt;
This module should only be called from {{tl|Date}} template. Please call that template to access this module. Also see {{tl|Date}} template for full documentation&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:&amp;lt;/nowiki&amp;gt;DateI18n|Date|year=...|month=...|day=...|hour=...|minute=...|second=...|tzhour=...|tzmin=...|lang=...}}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
;year, month, day, hour, minute, second &lt;br /&gt;
:(most are optional) parameters specifying part of the date&lt;br /&gt;
;tzhour, tzmin&lt;br /&gt;
:(optional and rarely used) time zone offset from UTC&lt;br /&gt;
;lang&lt;br /&gt;
:(optional) language to be used to display the date. If not specified language of the user will be used&lt;br /&gt;
;class&lt;br /&gt;
:(optional) Allows setting of the HTML class of the time node where the date is included. This is useful for microformats. The default value is, for legacy reasons, &amp;quot;dtstart&amp;quot; (used by [[w:HCalendar|hCalendar]]). See [[c:Commons:Microformats Project|the microformats project]]. &amp;quot;class=&amp;quot; will remove all metadata.&lt;br /&gt;
;case&lt;br /&gt;
:(optional) By default each language uses preferred form of the date, which typically has month in [[:en:Nominative case|nominative]] or [[:en:Genitive case|genitive]] [[:en:Grammatical case|grammatical case]]. With &amp;#039;&amp;#039;case&amp;#039;&amp;#039; parameter one can overwrite the preferred case with some other one used by a given language. Parser function {{#time}} stores [[:en:Nominative case|nominative]] and [[:en:Genitive case|genitive]] forms, others are stored in [[c:Data:I18n/MonthCases.tab|Data:I18n/MonthCases.tab]]. This functionality is mostly used by [[d:Q26905045|Module:Complex date]]. &lt;br /&gt;
;trim_year&lt;br /&gt;
:&amp;#039;&amp;#039;trim_year&amp;#039;&amp;#039; parameter&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:DateI18n|Date|year=1990|month=Oct|day=01|lang=en}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; produces {{#invoke:DateI18n|Date|year=1990|month=Oct|day=01|lang=en}}&lt;br /&gt;
&lt;br /&gt;
== Using this module from Lua code ==&lt;br /&gt;
&lt;br /&gt;
In order to use the functions in this module from another Lua module you first have to import this module.&lt;br /&gt;
 &lt;br /&gt;
Example:&lt;br /&gt;
: &amp;lt;code&amp;gt;local DateMod = require(&amp;#039;Module:DateI18n&amp;#039;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== _Date ===&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
: &amp;lt;code&amp;gt;date_string = DateMod._Date({year,month,day,hour,minute, second},lang)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== I18n tables ==&lt;br /&gt;
This module stores all the language specific settings in two files in &amp;quot;[[mw:Help:Tabular Data|Data]]&amp;quot; namespace: [[c:Data:DateI18n.tab|Data:DateI18n.tab]] and [[c:Data:I18n/MonthCases.tab|Data:I18n/MonthCases.tab]]&lt;br /&gt;
=== [[c:Data:DateI18n.tab|Data:DateI18n.tab]] === &lt;br /&gt;
Translation table with different forms of dates. Outputs are in the format used by [[mw:Help:Extension:ParserFunctions##time|{{#time}} parser function]]. There are several date formats supported, which depend on the data provided&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Date formats&lt;br /&gt;
|-&lt;br /&gt;
! Format string !! Meaning !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| YMDHMS || YYYY:MM:DD, HH:MM:SS format for year, month, day, hour, minutes, seconds || Most items in the list use format created from YMD format with hour, minutes and seconds added with &amp;quot;, HH:MM:SS&amp;quot;. All languages using this format do not have to be listed, as they default to English. &lt;br /&gt;
|-&lt;br /&gt;
| YMDHM  || YYYY:MM:DD, HH:MM format for year, month, day, hour, minutest || Most items in the list use format created from YMD format with hour and minutes added with &amp;quot;, HH:MM&amp;quot;. All languages using this format do not have to be listed, as they default to English. &lt;br /&gt;
|-&lt;br /&gt;
| YMD    || YYYY:MM:DD format for year, month, day || The languages using the same format as English do not need to be listed. &lt;br /&gt;
|-&lt;br /&gt;
| YM     || YYYY:MM (year-month) format  for year and month ||The languages using the same format as English do not need to be listed. &lt;br /&gt;
|-&lt;br /&gt;
| MD     || MM:DD (month-day) format for month and day ||The languages using the same format as English do not need to be listed. &lt;br /&gt;
|-&lt;br /&gt;
| Y      || YYYY (year only) format for year || Most languages show year as a simple number, those do not have to be listed as they will default to English.&lt;br /&gt;
|-&lt;br /&gt;
| M      || month name only || Most languages show year as a simple number, those do not have to be listed as they will default to English.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
; Special cases&lt;br /&gt;
Some languages like French Catalan, Gallic or Basque use different form for year-month-day dates  depending on the day of the month. the format of the [[mw:Help:Tabular Data|Tabular Data]] allowed only simple strings to be stored in multi-language arrays. In order to overcome that we stored data in strings that might look like &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;quot;{”default”:”j F Y”,”d01”:”j&amp;#039;&amp;lt;sup&amp;gt;er&amp;lt;/sup&amp;gt;&amp;#039; F Y”}&amp;quot;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.  This string is converted to following json code by replacing ”-double-quotes with regular straight double-quotes&lt;br /&gt;
&amp;lt;syntaxhighlight lang=json&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;default&amp;quot;:  &amp;quot;j F Y&amp;quot;,&lt;br /&gt;
  &amp;quot;d01&amp;quot;:      ”j&amp;#039;&amp;lt;sup&amp;gt;er&amp;lt;/sup&amp;gt;&amp;#039; F Y&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
than parsed and converted into Lua dictionary table. We convert day from the date into a key by adding &amp;quot;d&amp;quot; to a 2-digit integer representing day. If that key is in the dictionary than that form will be used otherwise we will use &amp;#039;&amp;#039;default&amp;#039;&amp;#039; form. The final step before passing it to [[mw:Help:Extension:ParserFunctions##time|{{#time}} parser function]] we will replace single quotes with double quotes which have special meaning for that function. &lt;br /&gt;
&lt;br /&gt;
===[[c:Data:I18n/MonthCases.tab|Data:I18n/MonthCases.tab]] === &lt;br /&gt;
[[:en:Grammatical case|Grammatical case]]s of month names in different languages used by [[Module:DateI18n]] and [[d:Q26905045|Module:Complex date]].&lt;/div&gt;</summary>
		<author><name>mw&gt;Dexbot</name></author>
	</entry>
</feed>