"मोड्युल:Unsigned" का संशोधनहरू बिचको अन्तर

Content deleted Content added
 
Fix
पङ्क्ति ३:
-- There's probably a way to use strptime or some other more sophisticated way, but you're not supposed to be using a non-timestamp as input anyway.
 
function string.endswith(String,End)
return End == '' or string.sub(String,-string.len(End)) == End
end
 
function trim(s)
return s:gsub("^%s+", ""):gsub("%s+$", "")
end
 
function addUtcToStringIfItDoesNotEndWithUtc(s)
if not s:endswith(s, "(UTC)") then
return trim(s) .. " (UTC)"
end
return s
Line १५ ⟶ १९:
 
function p.main(frame)
local argshopefullyTimestamp = frame.args[1] or os.date('%H:%M, %d %B %Y (%Z)')
local hopefullyTimestamp = args[1] or os.date('%H:%M, %d %B %Y (%Z)')
return addUtcToStringIfItDoesNotEndWithUtc(hopefullyTimestamp)
end
"https://ne.wikipedia.org/wiki/मोड्युल:Unsigned" बाट अनुप्रेषित