אונטערשייד צווישן ווערסיעס פון "יחידה:טווח זמנים"

קיין ענדערונג אין גרייס ,  פֿאַר 2 יאָר
ק
הגהה
ק (הגהה)
ק (הגהה)
שורה 176: שורה 176:
dateFormat = '%s – %s'
dateFormat = '%s – %s'
end
end
res = mw.ustring.format(dateFormat, HStartDate or startDate, HEnddate or endDate or 'הווה')
res = mw.ustring.format(dateFormat, HStartDate or startDate, HEndDate or endDate or 'הווה')
-- try to fallback to automatic duration if duration is not available
-- try to fallback to automatic duration if duration is not available
if showTimeDiff == 'כן' and duration==nil then
if showTimeDiff == 'כן' and duration==nil then
שורה 183: שורה 183:
end
end
else
else
res = HStartdate or startDate
res = HStartDate or startDate
end
end
elseif startDate~=nil and endDate~=nil  then
elseif startDate~=nil and endDate~=nil  then
שורה 190: שורה 190:
dateFormat = '%s – %s'
dateFormat = '%s – %s'
end
end
res = mw.ustring.format(dateFormat, HStartdate or startDate, HEndDate or endDate)
res = mw.ustring.format(dateFormat, HStartDate or startDate, HEndDate or endDate)
if showTimeDiff == 'כן' and duration==nil then
if showTimeDiff == 'כן' and duration==nil then
local success, automaicDuration = pcall(Date.parseDateRange, res, diffFormat, true)
local success, automaicDuration = pcall(Date.parseDateRange, res, diffFormat, true)