Module:Month name

local m = {};

--list of month names local months = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };

-- determines the month name (if called from another Lua module) function m.getmonth(m) return months[assert(tonumber(m), "input is not a month")]; end

-- determines the month name (if called from a template) function m.getmonth_template(frame) return m.getmonth(frame.args[1]); end

return m;