Skip to content
Aa
Reading appearance
Browse
Browse the wiki
Books
Characters
Houses
Places
History
Culture
More topics
Images
Television
Chapters
Timeline
Random Article
Community
Community Portal
Recent Changes
Our Sites
Westeros
Forum of Ice and Fire
Blood of Dragons MUSH
Login
Talk
Interact
Interact
Edit source
View history
More page tools
What links here
Related changes
Page information
Special pages
Editing
Module
:
Date range
Jump to:
navigation
,
search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
local getArgs = require('Module:Arguments').getArgs local p = {} local function is_empty(s) return s == nil or s == '' end -- TODO: Add circa (~), after (>) and before (<) function p.main(frame) local args = getArgs(frame) -- arguments passed to this module return p._main(args) end function p._main(args) local from = args.from or args[1] local to = args.to or args[2] local text = args.text local from_n = tonumber(from) local from_s = (from_n ~= nil) and tostring(math.abs(from_n)) local to_n = tonumber(to) local to_s = (to_n ~= nil) and tostring(math.abs(to_n)) if is_empty(from) then if is_empty(to) then return args.text elseif to == '-?' then return "Until before Aegon's Conquest" elseif to == '+?' or to == '?' then return "Until after Aegon's Conquest" elseif to_n and to_n < 0 then return "Until " .. to_s .. " Κα΄" elseif to_n and to_n > 0 then return "Until " .. to_s .. " α΄α΄" end elseif from == '-?' then if is_empty(to) then return "Since before Aegon's Conquest" elseif to == '-?' then return "Before Aegon's Conquest" elseif to == '+?' or to == '?' then return "Before and after Aegon's Conquest" elseif to_n and to_n < 0 then return "?β" .. to_s .. " Κα΄" elseif to_n and to_n > 0 then return "? Κα΄ β " .. to_s .. " α΄α΄" end elseif from == '+?' or from == '?' then if is_empty(to) then return "Since after Aegon's Conquest" elseif to == '-?' then error("Range impossible.") elseif to == '+?' or to == '?' then return "After Aegon's Conquest" elseif to_n and to_n < 0 then error("Range impossible.") elseif to_n and to_n > 0 then return "?β" .. to_s .. " α΄α΄" end elseif from_n and from_n < 0 then if is_empty(to) then return "Since " .. from_s .. " Κα΄" elseif to == '-?' then return from_s .. "β? Κα΄" elseif to == '+?' or to == '?' then return from_s .. " Κα΄ β ? α΄α΄" elseif to_n and to_n == from_n then return "In " .. from_s .. " Κα΄" elseif to_n and to_n < from_n then error("Range impossible.") elseif to_n and to_n < 0 then return from_s .. "β" .. to_s .. " Κα΄" elseif to_n and to_n > 0 then return from_s .. " Κα΄ β " .. to_s .. " α΄α΄" end elseif from_n and from_n > 0 then if is_empty(to) then return "Since " .. from_s .. " α΄α΄" elseif to == '-?' then error("Range impossible.") elseif to == '+?' or to == '?' then return from_s .. "β? α΄α΄" elseif to_n and to_n == from_n then return "In " .. from_s .. " α΄α΄" elseif to_n and to_n < from_n then error("Range impossible.") elseif to_n and to_n > from_n then return from_s .. "β" .. to_s .. " α΄α΄" end elseif from_n and from_n == 0 and to_n and to_n == 0 then return "During Aegon's Conquest" elseif from_n and from_n == 0 then return "Since Aegon's Conquest" elseif to_n and to_n == 0 then return "Until Aegon's Conquest" end end return p
Summary:
Please note that all contributions to A Wiki of Ice and Fire may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
A Wiki of Ice and Fire:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Preview page with this template
Page included on this page:
Module:Date range/doc
(
edit
)