Changes
Jump to navigation
Jump to search
no edit summary
{{Module rating|release}}{{Module rating|protected}}
__NOTOC__
== Summary ==
This module is intended for creating of date strings in any language. It serves as a back-end of {{tl|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 {{tl|Date}} template. Please call that template to access this module. Also see {{tl|Date}} template for full documentation
Usage:
: <code><nowiki>{{#invoke:</nowiki>Date|Date|year=...|month=...|day=...|hour=...|minute=...|second=...|tzhour=...|tzmin=...|lang=...}}</code>
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:
: <code><nowiki>{{#invoke:Date|Date|year=1990|month=Oct|day=01|lang=en}}</nowiki></code> produces {{#invoke:Date|Date|year=1990|month=Oct|day=01|lang=en}}
== 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:
: <code>local DateMod = require('Module:Date')</code>
=== _Date ===
Usage:
: <code>date_string = DateMod._Date({year,month,day,hour,minute, second},lang)</code>
==See Also==
{{collapse|title=Modules related to internationalization (i18n) of dates|1={{DateRelatedModules}}}}
__NOTOC__
== Summary ==
This module is intended for creating of date strings in any language. It serves as a back-end of {{tl|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 {{tl|Date}} template. Please call that template to access this module. Also see {{tl|Date}} template for full documentation
Usage:
: <code><nowiki>{{#invoke:</nowiki>Date|Date|year=...|month=...|day=...|hour=...|minute=...|second=...|tzhour=...|tzmin=...|lang=...}}</code>
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:
: <code><nowiki>{{#invoke:Date|Date|year=1990|month=Oct|day=01|lang=en}}</nowiki></code> produces {{#invoke:Date|Date|year=1990|month=Oct|day=01|lang=en}}
== 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:
: <code>local DateMod = require('Module:Date')</code>
=== _Date ===
Usage:
: <code>date_string = DateMod._Date({year,month,day,hour,minute, second},lang)</code>
==See Also==
{{collapse|title=Modules related to internationalization (i18n) of dates|1={{DateRelatedModules}}}}