Module:Webarchive: திருத்தங்களுக்கு இடையிலான வேறுபாடு

உள்ளடக்கம் நீக்கப்பட்டது உள்ளடக்கம் சேர்க்கப்பட்டது
imported>Lingam
No edit summary
imported>Legoktm
சி Replacing Module:No globals with require('strict') (more info) #noglobals
 
(2 பயனர்களால் செய்யப்பட்ட 3 இடைப்பட்ட திருத்தங்கள் காட்டப்படவில்லை.)
வரிசை 268:
local date = table.concat ({year, month, day}, '-'); -- assemble year-initial numeric-format date (zero padding not required here)
 
if non_western_digits then -- this wiki uses non-western digits?
date = mw.ustring.gsub (date, '%d', digits); -- convert this wiki's non-western digits to western digits
end
வரிசை 359:
 
decode = makeDate (dt.year, dt.month, dt.day, 'iso'); -- date comparisons are all done in iso format with western digits
if non_western_digits then -- this wiki uses non-western digits?
decode = mw.ustring.gsub (decode, '%d', digits); -- convert this wiki's non-western digits to western digits
end
வரிசை 370:
 
Given a URI-path to Wayback (eg. /web/20160901010101/http://example.com )
or Library of Congress Web Archives (eg. /all/20160901010101/http://example.com)
or UK Government Web Archive (eg. /ukgwa/20160901010101/http://example.com or /tna/20160901010101/http://example.com)
 
return the formatted date eg. "September 1, 2016" in df format
Handle non-digits in snapshot ID such as "re_" and "-" and "*"
வரி 390 ⟶ 388:
local msg, snapdate;
 
snapdate = path:gsub ('^/web/', ''):gsub ('^/all/', ''):gsub ('^/ukgwa/', ''):gsub ('^/tnaweb/', ''):gsub ('^/', ''); -- remove leading /web/, '/all/', /ukgwa/,leading '/tnaweb/,' or leading '/'
snapdate = snapdate:match ('^[^/]+'); -- get timestamp
if snapdate == "*" then -- eg. /web/*/http.., etcor /all/*/http..
return 'index'; -- return indicator that this url has an index date
end
வரி 550 ⟶ 548:
ulx[argurl2] = {}
ulx[argurl2]["url"] = args[argurl]
argdate = "date" .. ij
if args[argdate] then
ulx[argurl2]["date"] = args[argdate]
வரி 557 ⟶ 555:
end
argtitle = "title" .. ij
if args[argtitle] then
ulx[argurl2]["title"] = args[argtitle]
வரி 849 ⟶ 847:
date = 'index';
ldf = 'iso'; -- set to default format
elseif 'mdy' == date then
date = nil; -- if date extracted from URL,
ldf = 'mdy'; -- then |date=mdy overrides iso
elseif 'dmy' == date then
date = nil; -- if date extracted from URL,
ldf = 'dmy'; -- then |date=dmy overrides iso
elseif 'ymd' == date then
date = nil; -- if date extracted from URL,
ldf = 'ymd'; -- then |date=ymd overrides iso
else
date, ldf = decode_date (date); -- get an iso format date from date and get date's original format
வரி 863 ⟶ 852:
end
 
if 'wayback' == ulx.url1.service or 'locwebarchives' == ulx.url1.service or 'ukgwa' == ulx.url1.service then
if date then
if config.verifydates then
"https://tamilar.wiki/w/Module:Webarchive" இலிருந்து மீள்விக்கப்பட்டது