Module:ISOdate/doc
Appearance
This is the documentation page for Module:ISOdate
| <translate> This module is rated as [[<tvar name=1>Special:MyLanguage/Category:Modules for general use</tvar>|ready for general use]].</translate> <translate> It has reached a mature form and is thought to be bug-free and ready for use wherever appropriate.</translate> <translate> It is ready to mention on help pages and other resources as an option for new users to learn.</translate> <translate> To reduce server load and bad output, it should be improved by sandbox testing rather than repeated trial-and-error editing.</translate> |
| <translate> This module is [[<tvar name=1>Special:MyLanguage/Category:Modules subject to page protection</tvar>|subject to {{<tvar name=2>#if:</tvar>|cascading|page}} protection]].</translate> <translate> It is a highly visible module in use by a very large number of pages.</translate> <translate> Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is [[<tvar name=1>Special:MyLanguage/Project:Protected page</tvar>|protected]] from editing.</translate> |
This module is intended for processing of date strings. Currently used by:
It relies on Module:DateI18n
ISOdate
This function is the engine behind {{ISOdate}}. Please see that template for full documentation
Usage:
- should not be used directly but only through {{ISOdate}} template
Parameters:
|date=dateor|1=date- a valid date in "YYYY-MM-DD HH:MM:SS" format; this date can be abbreviated with less fields (e.g. only the year), and leading zeroes in each numeric field may be dropped; this date may be optionally followed by a required space and any trailing text (which should be between parentheses) parsed and left as is in the ouput; if the specified date is not in a valid format, the value of this parameter will be returned as is.
|class=class- optional parameter for embedding the output within an invisible HTML
<span class="class" lang="lang" dir="ltr or rtl">...</span>element with this class, also tagging the specified language and its direction (by default, use|class=dtime, as defined in microformats); set it to an empty value to remove this invisible HTML tag; this microtag is also not emitted if the given date cannot be parsed with one of the supported formats and its value will be returned as is. |lang=lang- optional BCP 47 code of a language (not an interwiki code) used to translate the generated visible date (also used to properly tag the generated microformat, if it is generated, in the standard
lang="lang"attribute of HTML) |case=case- optional parameter for handling grammatical cases (such as genitive) in the translated date; only valid with some specific languages.
|trim_year=flag- optional parameter which allows (when it is set to a nn-empty value) to not display additional leading zeroes for years; by default or when this parameter is empty, years are rendered with at least 4 digits, padding them with zeroes as necessary.
ISOyear
This function is the engine behind {{ISOyear}}. Please see that template for full documentation
Usage:
- should not be used directly but only through {{ISOyear}} template
Parameters:
- 1
- date or 1 parameter
See Also
| Modules related to internationalization (i18n) of dates |
| Template:DateRelatedModules |