4,599
edits
No edit summary |
No edit summary |
||
Line 44: | Line 44: | ||
end | end | ||
--Calculates a persons age | --Converts a short from date to a long from date using the specified calendar | ||
function age(firstDate | function p.date(frame) | ||
return writeDate(convertShortDate(frame.args[1], frame.args[2])) | |||
end | |||
--Calculates a persons age using the specified calendar | |||
function p.age(frame) | |||
firstDate = frame.args[1] | |||
secondDate = frame.args[2] | |||
status = frame.args[3] | |||
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 | ||
Line 67: | Line 77: | ||
return writeDate(secondDate).." (aged "..age..")" | return writeDate(secondDate).." (aged "..age..")" | ||
end | end | ||
end | end | ||
return p | return p |