Module:Date time/doc: Difference between revisions
Appearance
Content deleted Content added
No edit summary |
|||
Line 1: | Line 1: | ||
{{Module rating|release}} |
{{Module rating|release}} |
||
{{High-use}} |
|||
{{Lua|Module:Arguments|Module:Time ago}} |
|||
[[Module:Date time]] provides functions for validating and formatting dates in templates such as {{tl|Start date}}, {{tl|End date}}, {{tl|Start date and age}}, and {{tl|End date and age}}. |
[[Module:Date time]] provides functions for validating and formatting dates in templates such as {{tl|Start date}}, {{tl|End date}}, {{tl|Start date and age}}, and {{tl|End date and age}}. |
Latest revision as of 14:24, 10 April 2025
![]() | This Lua module is used on approximately 522,000 pages, or roughly 1% of all pages. To avoid major disruption and server load, any changes should be tested in the module's /sandbox or /testcases subpages, or in your own module sandbox. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
![]() | This module depends on the following other modules: |
Module:Date time provides functions for validating and formatting dates in templates such as {{Start date}}, {{End date}}, {{Start date and age}}, and {{End date and age}}.
It handles:
- Validation of date components (year, month, day)
- Validation of time components (hour, minute, second)
- Timezone formatting and validation
- Generation of appropriate hCalendar microformat markup
- "time-ago" calculations
Returns an error message and category if validation fails.
Usage
[edit]{{#invoke:Date time|generate_date}}
{{#invoke:Date time|validate_date_time}}