Module:Date/doc
Ceci est la page de documentation pour Module:Date
This template is used on a very large number of pages. To avoid large-scale disruption and unnecessary server load, any changes should first be tested in this template's /sandbox or /testcases subpage, or in your own user space. The tested changes can then be added in one single edit to this template. Please consider discussing any changes on the talk page before implementing them. |
Summary
This module is intended for creating of date strings in any language. It serves as a back-end of {{Date}} template. See documentation of that template for documentation.
The internationalization of the date formats can be found at Module:I18n/date. Called from Module:ISOdate.
Using this module from templates
Date
This module should only be called from {{Date}} template. Please call that template to access this module. Also see {{Date}} template for full documentation
Usage:
{{#invoke:Date|Date|year=...|month=...|day=...|hour=...|minute=...|second=...|lang=...}}
Parameters:
- year
- year parameter
- month
- month parameter
- year
- year parameter
- day
- day parameter
- hour
- hour parameter
- minute
- minute parameter
- second
- second parameter
- lang
- lang - language parameter
- class
- class - parameter adds html class microtag
- case
- case - parameter for grammatical cases
- trim_year
- trim_year parameter
Example:
{{#invoke:Date|Date|year=1990|month=Oct|day=01|lang=en}}
produces
Using this module from Lua code
In order to use the functions in this module from another Lua module you first have to import this module.
Example:
local DateMod = require('Module:Date')
_Date
Usage:
date_string = DateMod._Date({year,month,day,hour,minute, second},lang)