Module:Upcoming Birthdays: Difference between revisions
From NOISZ Wiki
RiceEmpress (talk | contribs) mNo edit summary |
RiceEmpress (talk | contribs) mNo edit summary |
||
| Line 3: | Line 3: | ||
local currentYear = lang:formatDate("Y") | local currentYear = lang:formatDate("Y") | ||
local nextYear = lang:formatDate("Y") + 1 | local nextYear = lang:formatDate("Y") + 1 | ||
local p = {} | local p = {} | ||
function p.main() | function p.main() | ||
birthdays = {} | |||
birthdays[1] = {'Hikari Aoki','22 January',os.difftime(os.time(),os.time{year=currentYear,month=01,day=22})} | |||
birthdays[2] = {'Sera Hoshikawa','14 March'} | |||
birthdays[3] = {'Grace Kamenashi','01 April'} | |||
birthdays[4] = {'Arietta Antiphon','18 June'} | |||
birthdays[5] = {'Joker','18 June'} | |||
birthdays[6] = {'Asuka Fujita','30 July'} | |||
birthdays[7] = {'Sumire Hitori','09 September'} | |||
birthdays[8] = {'Hitori','09 September'} | |||
birthdays[9] = {'Hakuno Nekoda','25 December'} | |||
birthdays[10] = {'Shion Nekoda','29 December'} | |||
local hakunoTime = os.time{year=2025, month=12, day=25} | |||
local hakunoDate = lang:formatDate("F d, Y H:i T",'@' .. hakunoTime) | |||
return os.difftime(hakunoTime,os.time()) | |||
end | end | ||
return p | return p | ||
Revision as of 09:58, 29 September 2025
Documentation for this module may be created at Module:Upcoming Birthdays/doc
local capiunto = require 'capiunto'
local lang = mw.language.getContentLanguage()
local currentYear = lang:formatDate("Y")
local nextYear = lang:formatDate("Y") + 1
local p = {}
function p.main()
birthdays = {}
birthdays[1] = {'Hikari Aoki','22 January',os.difftime(os.time(),os.time{year=currentYear,month=01,day=22})}
birthdays[2] = {'Sera Hoshikawa','14 March'}
birthdays[3] = {'Grace Kamenashi','01 April'}
birthdays[4] = {'Arietta Antiphon','18 June'}
birthdays[5] = {'Joker','18 June'}
birthdays[6] = {'Asuka Fujita','30 July'}
birthdays[7] = {'Sumire Hitori','09 September'}
birthdays[8] = {'Hitori','09 September'}
birthdays[9] = {'Hakuno Nekoda','25 December'}
birthdays[10] = {'Shion Nekoda','29 December'}
local hakunoTime = os.time{year=2025, month=12, day=25}
local hakunoDate = lang:formatDate("F d, Y H:i T",'@' .. hakunoTime)
return os.difftime(hakunoTime,os.time())
end
return p