Timeline
Jump to navigation
Jump to search
| Line 5: | Line 5: | ||
return "mw.smw module not found" | return "mw.smw module not found" | ||
end | end | ||
local | local peopleBirthDates = mw.smw.ask("[[Category:Person]]|?Person:Name|?Person:Date of birth") | ||
local peopleDeathDates = mw.smw.ask("[[Category:Person]]|?Person:Name|?Person:Date of death") | |||
local compositionDates = mw.smw.ask("[[Category:Composition]]|?Person:Title|?Composition:Date") | |||
local result = "" | local result = "" | ||
for num, row in pairs( | for num, row in pairs( peopleBirthDates ) do | ||
result = result .. row["Person:Date of birth"] | result = result .. lang:formatDate("U", row["Person:Date of birth"]) | ||
end | end | ||
Revision as of 20:23, 10 November 2022
Documentation for this module may be created at Module:Timeline/doc
local p = {}
function p.render( frame )
if not mw.smw then
return "mw.smw module not found"
end
local peopleBirthDates = mw.smw.ask("[[Category:Person]]|?Person:Name|?Person:Date of birth")
local peopleDeathDates = mw.smw.ask("[[Category:Person]]|?Person:Name|?Person:Date of death")
local compositionDates = mw.smw.ask("[[Category:Composition]]|?Person:Title|?Composition:Date")
local result = ""
for num, row in pairs( peopleBirthDates ) do
result = result .. lang:formatDate("U", row["Person:Date of birth"])
end
return result
end
return p