Module:Keppel birthday: Difference between revisions
From Amaranth Legacy, available at amaranth-legacy.community
More actions
Content deleted Content added
Tesinormed (talk | contribs) Created page with "local p = {} -- libraries local getArgs = require('Module:Arguments').getArgs local keppelDate = require('Module:Keppel date').invoke local birthdays = { { year = 1112, month = 12, day = 27, character = 'Tethyr Bathylis' } } function p.main(frame) local keppelDate = keppelDate(frame) for birthday in birthdays do if birthday.year == keppelDate.year and birthday.month == keppelDate.month and birthday.day == keppelDate.day then return birthday.character end en..." |
Tesinormed (talk | contribs) No edit summary |
||
| Line 6: | Line 6: | ||
local birthdays = { |
local birthdays = { |
||
{ year = 1112, month = 12, day = 27 |
['Tethyr Bathylis'] = { year = 1112, month = 12, day = 27 } |
||
} |
} |
||
function p.main(frame) |
function p.main(frame) |
||
local keppelDate = keppelDate(frame) |
local keppelDate = keppelDate(frame) |
||
for birthday in birthdays do |
for character, birthday in pairs(birthdays) do |
||
if birthday.year == keppelDate.year and birthday.month == keppelDate.month and birthday.day == keppelDate.day then |
if birthday.year == keppelDate.year and birthday.month == keppelDate.month and birthday.day == keppelDate.day then |
||
return |
return character |
||
end |
end |
||
end |
end |
||
Revision as of 03:55, March 10, 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').invoke
local birthdays = {
['Tethyr Bathylis'] = { year = 1112, month = 12, day = 27 }
}
function p.main(frame)
local keppelDate = keppelDate(frame)
for character, birthday in pairs(birthdays) do
if birthday.year == keppelDate.year and birthday.month == keppelDate.month and birthday.day == keppelDate.day then
return character
end
end
return ''
end
return p