Module:Age: Difference between revisions
new show=h, show=hm where days not wanted; show error for an unsupported show (occurs with partial dates)
(fix <span> anchor for error message) |
(new show=h, show=hm where days not wanted; show error for an unsupported show (occurs with partial dates)) |
||
Line 146: | Line 146: | ||
w = { 'w', id = 'w' }, | w = { 'w', id = 'w' }, | ||
wd = { 'w', 'd', id = 'wd' }, | wd = { 'w', 'd', id = 'wd' }, | ||
h = { 'H', id = 'h' }, | |||
hm = { 'H', 'M', id = 'hm' }, | |||
d = { 'd', id = 'd' }, | d = { 'd', id = 'd' }, | ||
dh = { 'd', 'H', id = 'dh' }, | dh = { 'd', 'H', id = 'dh' }, | ||
Line 369: | Line 371: | ||
end | end | ||
local values = { diff:age(show.id, diff_options) } | local values = { diff:age(show.id, diff_options) } | ||
return make_text(values, show, names[abbr], text_options) | if values[1] then | ||
return make_text(values, show, names[abbr], text_options) | |||
end | |||
return message('Parameter show=' .. show.id .. ' is not supported here') | |||
end | end | ||