Module:Date Stuff: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 2: Line 2:


function p.date(frame)
function p.date(frame)
local orgiArgs = frame:getParent().args
local orgiArgs = frame.args
local args = {}
local args = {}
for k, v in pairs(orgiArgs) do
for k, v in pairs(orgiArgs) do
Line 14: Line 14:


function p.age(frame)
function p.age(frame)
local orgiArgs = frame:getParent().args
local orgiArgs = frame.args
local args = {}
local args = {}
for k, v in pairs(orgiArgs) do
for k, v in pairs(orgiArgs) do
Line 82: Line 82:
--Calculates a persons age using the specified calendar
--Calculates a persons age using the specified calendar
function p._age(frame)
function p._age(frame)
   firstDate = frame:getParent().args[1]
   firstDate = frame.args[1]
   secondDate = frame:getParent().args[2]
   secondDate = frame.args[2]
   status = frame:getParent().args[3]
   status = frame.args[3]
   calendar = frame:getParent().args[4]
   calendar = frame.args[4]
   --checks if firstDate is not nil, and if it is returns the second date
   --checks if firstDate is not nil, and if it is returns the second date
   if firstDate ~= nil then
   if firstDate ~= nil then

Navigation menu