Module:Date/doc

De Wiklou, le Wiki du Biclou
Aller à : navigation, rechercher

Ceci est la page de documentation pour Module:Date


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)

See Also

Modèle:Collapse