Module:Keppel birthday: Difference between revisions
From Amaranth Legacy, available at amaranth-legacy.community
More actions
Content deleted Content added
Tesinormed (talk | contribs) No edit summary |
No edit summary |
||
| (12 intermediate revisions by 2 users not shown) | |||
| Line 3: | Line 3: | ||
-- libraries |
-- libraries |
||
local getArgs = require('Module:Arguments').getArgs |
local getArgs = require('Module:Arguments').getArgs |
||
local keppelDate = require('Module:Keppel date'). |
local keppelDate = require('Module:Keppel date').convert |
||
local birthdays = { |
local birthdays = { |
||
[' |
['[[Cendysdin Auscec]]'] = { lythryd = 11, day = 7 }, |
||
['[[Danei Blackwind]]'] = { lythryd = 4, day = 30 }, |
|||
['[[Elerys Sheffeld]]'] = { lythryd = 10, day = 14 }, |
|||
['[[Ipawet]]'] = { lythryd = 8, day = 5 }, |
|||
['[[Mavanys Alddottir]]'] = { lythryd = 6, day = 28 }, |
|||
['[[Moerrir Drummand]]'] = { lythryd = 5, day = 31 }, |
|||
['[[Moveriath]]'] = { lythryd = 2, day = 1 }, |
|||
['[[Randy Barrowbret]]'] = { lythryd = 11, day = 2 }, |
|||
['[[Seren Afon-Tan]]'] = { lythryd = 5, day = 24 }, |
|||
['[[Soleyl]]'] = { lythryd = 5, day = 31 }, |
|||
['[[Tethyr Bathylis]]'] = { lythryd = 12, day = 28 }, |
|||
['[[Thaorel]]'] = { lythryd = 3, day = 10 }, |
|||
['[[Venrayeth Solsunc]]'] = { lythryd = 9, day = 20 }, |
|||
['[[Weywot Re]]'] = { lythryd = 8, day = 10 }, |
|||
} |
} |
||
function p.main(frame) |
function p.main(frame) |
||
local keppelDate = keppelDate( |
local keppelDate = keppelDate(os.time()) |
||
local currentBirthdays = {} |
|||
for character, birthday in pairs(birthdays) do |
for character, birthday in pairs(birthdays) do |
||
if |
if birthday.lythryd == keppelDate.lythryd and birthday.day == keppelDate.day then |
||
table.insert(currentBirthdays, character) |
|||
end |
end |
||
end |
end |
||
return '' |
return table.concat(currentBirthdays, ' and ') |
||
end |
end |
||
Latest revision as of 08:25, September 17, 2025
Documentation for this module may be created at Module:Keppel birthday/doc
local p = {}
-- libraries
local getArgs = require('Module:Arguments').getArgs
local keppelDate = require('Module:Keppel date').convert
local birthdays = {
['[[Cendysdin Auscec]]'] = { lythryd = 11, day = 7 },
['[[Danei Blackwind]]'] = { lythryd = 4, day = 30 },
['[[Elerys Sheffeld]]'] = { lythryd = 10, day = 14 },
['[[Ipawet]]'] = { lythryd = 8, day = 5 },
['[[Mavanys Alddottir]]'] = { lythryd = 6, day = 28 },
['[[Moerrir Drummand]]'] = { lythryd = 5, day = 31 },
['[[Moveriath]]'] = { lythryd = 2, day = 1 },
['[[Randy Barrowbret]]'] = { lythryd = 11, day = 2 },
['[[Seren Afon-Tan]]'] = { lythryd = 5, day = 24 },
['[[Soleyl]]'] = { lythryd = 5, day = 31 },
['[[Tethyr Bathylis]]'] = { lythryd = 12, day = 28 },
['[[Thaorel]]'] = { lythryd = 3, day = 10 },
['[[Venrayeth Solsunc]]'] = { lythryd = 9, day = 20 },
['[[Weywot Re]]'] = { lythryd = 8, day = 10 },
}
function p.main(frame)
local keppelDate = keppelDate(os.time())
local currentBirthdays = {}
for character, birthday in pairs(birthdays) do
if birthday.lythryd == keppelDate.lythryd and birthday.day == keppelDate.day then
table.insert(currentBirthdays, character)
end
end
return table.concat(currentBirthdays, ' and ')
end
return p