Difference between revisions of "Module:Date/doc"
Jump to navigation
Jump to search
en>Jarekt |
m (1 revision imported) |
(No difference)
|
Latest revision as of 22:22, 9 February 2019
40x40px |
40x40px |
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=...|tzhour=...|tzmin=...|lang=...}}
Parameters:
- year
- year parameter
- month
- month parameter
- year
- year parameter
- day
- day parameter
- hour
- hour parameter
- minute
- minute parameter
- second
- second parameter
- tzhour
- tzhour parameter - time zone offset from UTC, hours component
- tzmin
- tzmin parameter - time zone offset from UTC, minutes component
- 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
Modules related to internationalization (i18n) of dates | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|