View source for Module:Weather box
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
-- Implement [[Template:Weather box]].
local precision = require('Module:Math')._precision
local function stripToNil(text)
-- If text is a non-empty string, return its trimmed content.
-- Otherwise, return nothing (text is an empty string or is not a string).
if type(text) == 'string' then
return text:match('(%S.-)%s*$')
end
end
local function isAny(args, suffix)
local months = { 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' }
for _, month in ipairs(months) do
if stripToNil(args[month .. suffix]) then
return true
end
end
end
local function makeLabel(args, is_first, base, what)
000
1:0
Template used on this page:
Return to Module:Weather box.