Module:Date Stuff: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 1: Line 1:
local p = {}
local args = {}
local args = {}


Line 11: Line 12:


--Takes a short date and converts it to a long date (12-18-392 to Tymust 18, 392)
--Takes a short date and converts it to a long date (12-18-392 to Tymust 18, 392)
local function solandria(date)
function p.solandria(date)
   --Splits the date
   --Splits the date
   date = Split(date, "-")
   date = Split(date, "-")
Line 63: Line 64:


--Calculates an age based on two given dates
--Calculates an age based on two given dates
local function solandriaBirthDateAge(birthDate, currentDate)
function p.solandriaBirthDateAge(birthDate, currentDate)
   --Converts the first given date to a long date
   --Converts the first given date to a long date
   convertedDate = solandria(birthDate)
   convertedDate = solandria(birthDate)
Line 103: Line 104:
end
end


return p
--print(solandria("1-2-3"))
--print(solandria("1-2-3"))
--print(solandriaBirthDateAge("12-18-392", "11-22-400"))
--print(solandriaBirthDateAge("12-18-392", "11-22-400"))