Module:Date/doc

De Wiklou, le Wiki du Biclou
< Module:Date
Révision datée du 21 janvier 2016 à 12:58 par Morgan (discussion | contributions) (1 révision importée : import de doc manquantes à certains modules)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
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