User:Slobot/date

From Wikimedia Commons, the free media repository
Jump to: navigation, search
English: Feel free to edit this page and add further language versions of this short description of the bot's task.
Español: Siéntete libre para editar esta página y añadir más versiones en otros idiomas de esta corta descripción de la tarea de este bot.
Français: Soyez libre d'éditer cette page et d'ajouter d'autres traductions de cette courte description de la tâche de ce bot.
Русский: Спокойно редактируйте данную страницу и добавляйте прочие языковые версии этого краткого описания работы бота.


The bot Slobot changes the date format of dates in templates like {{Information}}, {{Creator}} and several others from a language-dependent format like "August 1 2008", or "1st August 2008", or "1° agosto 2008", or "2008년 8월 1일" to the international standard format ISO 8601 ("2008-08-01").

The main advantage of this is, that - by using parser functions and a formatting template - the date can be rendered in the language the user has specified in his or her preferences. A Korean user will see the date "2008년 8월 1일", while an Italian user will see "1° agosto 2008" and an English user "1 August 2008" (and a Bengali user "আগস্ট ১, ২০০৮").

How does this work? Let's take {{Information}} as an example. {{Information}} hands over its "date" parameter to the template {{ISOdate}}. That template looks, whether the date is formatted in ISO 8601 format (by applying the {{#time: ... }} parser function). If this is not the case, the parameter will be displayed as literal string. If it is the case, {{ISOdate}} will split up the date in year, month, day and hand it over to {{Date}}. {{Date}} contains formatting information for many languages (if your language is still missing ask to have it added on the talk page of that template). If your language uses different numerals than the Western (Arabic) numerals, the numbers will be handed over to {{Formatnum}} and be rendered with local numerals.

User:Slomox/test3