Module:Zodiac date: Difference between revisions

Content deleted Content added
m local t, sn, zd;
m Reverted 3 edits by AgorahillsCW (talk) to last revision by Jc3s5h
 
(15 intermediate revisions by 9 users not shown)
Line 1:
-- Module:Zodiac date
local p = {}
 
function p.main( frame )
local signNumber = tonumber(frame.args[1]) or 1
local year = tonumber(frame.args[2]) or os.date("!*t").year
local year = 0 -- initialize so it will defined no matter which path the if
-- statement takes
if frame.args[2] == nil then
local t = os.date("*t") -- Get the current year.
year = tonumber(t["year"])
else
year = tonumber(frame.args[2]) -- The call is requesting a particular year.
end
--<span style="color:red">red writing</span>
if (year < 2015) or (year > 2050) or ((year == 2050) and (signNumber == 10)) then