Module:Weather box/sandbox: Difference between revisions

Content deleted Content added
TekXS (talk | contribs)
No edit summary
Tag: Reverted
sync + try "Percentage possible sunshine" per talk proposal
 
(4 intermediate revisions by 3 users not shown)
Line 22:
 
local function isAny(args, suffix)
local months = { 'NDJan', 'DDFeb', 'DJMar', 'JJApr', 'JFMay', 'FFJun', 'FMJul', 'MMAug', 'MASep', 'AAOct', 'AYNov', 'YY', 'YU', 'UU', 'UL', 'LL', 'LG', 'GG', 'GS', 'SS', 'SO', 'OO', 'ONDec' }
for _, month in ipairs(months) do
if stripToNil(args[month .. suffix]) then
Line 135:
 
|-
!scope="colrow" |NDMonth
!scope="col" |DDJan
!scope="col" |DJFeb
!scope="col" |JJMar
!scope="col" |JFApr
!scope="col" |FFMay
!scope="col" |FMJun
!scope="col" |MMJul
!scope="col" |MAAug
!scope="col" |AASep
!scope="col" |AYOct
!scope="col" |YYNov
!scope="col" |YUDec
!scope="col" |UU
!scope="col" |UL
!scope="col" |LL
!scope="col" |LG
!scope="col" |GG
!scope="col" |GS
!scope="col" |SS
!scope="col" |SO
!scope="col" |OO
!scope="col" |ON
!scope="col" |NN
!scope="col" style="border-left-width:medium" |Year
]=],
Line 189 ⟶ 178:
annual_mode = 'max',
},
{---------- FIRST LINE AVERAGEMEAN HIGHDAILY MAXIMUM TEMPERATURES ----------
WANTROW = _ifany(' high C') or _ifany(' high F'),
mode = 'temperature',
Line 195 ⟶ 184:
color_scheme = _colorscheme('temperature', 't'),
scale_factor = '1',
label = 'AverageMean highdaily maximum °' .. _if('metric first', 'C', 'F') .. _ifSingle(' (°' .. _if('metric first', 'F', 'C') .. ')'),
annual_mode = 'avg',
},
Line 207 ⟶ 196:
annual_mode = 'avg',
},
{---------- FIRST LINE AVERAGEMEAN LOWDAILY MINIMUM TEMPERATURES ----------
WANTROW = _ifany(' low C') or _ifany(' low F'),
mode = 'temperature',
Line 213 ⟶ 202:
color_scheme = _colorscheme('temperature', 't'),
scale_factor = '1',
label = 'AverageMean lowdaily minimum °' .. _if('metric first', 'C', 'F') .. _ifSingle(' (°' .. _if('metric first', 'F', 'C') .. ')'),
annual_mode = 'avg',
},
Line 306 ⟶ 295:
annual_mode = 'max',
},
{---------- SECOND LINE AVERAGEMEAN HIGHDAILY MAXIMUM TEMPERATURES ----------
WANTROW = not options.wantSingleLine and (_ifany(' high C') or _ifany(' high F')),
mode = 'temperature',
Line 313 ⟶ 302:
color_scheme = _colorscheme('temperature', 't'),
scale_factor = '1',
label = 'AverageMean highdaily maximum °' .. _if('metric first', 'F', 'C'),
annual_mode = 'avg',
},
Line 327 ⟶ 316:
annual_mode = 'avg',
},
{---------- SECOND LINE AVERAGEMEAN LOWDAILY MINIMUM TEMPERATURES ----------
WANTROW = not options.wantSingleLine and (_ifany(' low C') or _ifany(' low F')),
mode = 'temperature',
Line 334 ⟶ 323:
color_scheme = _colorscheme('temperature', 't'),
scale_factor = '1',
label = 'AverageMean lowdaily minimum °' .. _if('metric first', 'F', 'C'),
show = _if('metric first', '2', '1'),
annual_mode = 'avg',
Line 513 ⟶ 502:
color_scheme = _colorscheme('sun', 's'),
scale_factor = '7.2',
label = 'PercentPercentage [[Sunshine duration|possible sunshine]]',
annual_mode = 'avg',
},