Module:Navbox timeline: Difference between revisions
AZMindroma (talk | contribs) No edit summary |
AZMindroma (talk | contribs) Replaced month text with numbers |
||
| Line 19: | Line 19: | ||
-- Get month abbreviation | -- Get month abbreviation | ||
local function | local function getMonthNum(month) | ||
return tostring(month) | |||
return | |||
end | end | ||
-- Parse date string (supports YYYY, YYYY-MM, or YYYY-YYYY formats) | -- Parse date string (supports YYYY, YYYY-MM, or YYYY-YYYY formats) | ||
| Line 266: | Line 265: | ||
:cssText(args.monthstyle) | :cssText(args.monthstyle) | ||
:cssText('width:' .. monthWidth .. '%') | :cssText('width:' .. monthWidth .. '%') | ||
:wikitext( | :wikitext(getMonthNum(monthNum)) | ||
yearStart = yearStart + 1 | yearStart = yearStart + 1 | ||