Module:DateThings: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 40: Line 40:
--OutputText = OutputText .. trim(DateList[i])
--OutputText = OutputText .. trim(DateList[i])
OutputText = OutputText .. Year .. OutputSeparator .. Month .. OutputSeparator .. Day
--OutputText = OutputText .. Year .. OutputSeparator .. Month .. OutputSeparator .. Day
if Year==OldYear then
if Month==OldMonth then
OutputText = OutputText .. Day --Only the day is different
else
OutputText = OutputText .. Month .. "-" .. Day --Day and month are different
end
else
OutputText = OutputText .. Year .. "-" .. Month .. "-" .. Day --All three are different
end
OldYear = Year
OldMonth = Month
end
end