Module:NormalizationDate: Difference between revisions
// via Wikitext Extension for VSCode |
// via Wikitext Extension for VSCode |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
-- | --[[ | ||
* Name: NormalizationDate | |||
* Author: Mark W. Datysgeld | |||
* Description: Date parser and normalizer supporting various formats, outputs "Month DD, YYYY" format or year-only when no full date available | |||
* Notes: Toggle between full names ("January") and abbreviations ("Jan.") with setUseShortMonthNames(); supports text-based formats, numeric formats, and year-only; includes caching for performance; reads configuration from ConfigRepository | |||
]] | |||
- | |||
- | |||
local p = {} | local p = {} | ||
-- Module configuration | -- Module configuration | ||
local useShortMonthNames = | local ConfigRepository = require('Module:ConfigRepository') | ||
local useShortMonthNames = ConfigRepository.dateFormatting.useShortMonthNames -- Read from central configuration | |||
-- Normalize capitalization of months and abbreviations. | -- Normalize capitalization of months and abbreviations. | ||