今天是2024年7月5日 第27周 星期五

代人,时大变了。

我们生活在大地上,但我们的梦想超越天空。

更改

跳到导航 跳到搜索
添加346字节 、 2022年10月31日 (一) 01:46
导入1个版本:​测试
第928行: 第928行:  
end
 
end
   −
 
+
local function tidy_date(date)
 +
if date:match("^%d%d%d%d%-%d%d?%-%d%d?$") then
 +
local y, m, d = date:match("(%d%d%d%d)%-(%d%d?)%-(%d%d?)")
 +
return y..'-'..string.format('%02d', m)..'-'..string.format('%02d', d)
 +
else
 +
return date
 +
end
 +
end
 
--[[--------------------------< N O W R A P _ D A T E >--------------------------------------------------------
 
--[[--------------------------< N O W R A P _ D A T E >--------------------------------------------------------
   第2,835行: 第2,842行:  
local PublicationDate = A['PublicationDate'];
 
local PublicationDate = A['PublicationDate'];
 
local OrigYear = A['OrigYear'];
 
local OrigYear = A['OrigYear'];
local Date = A['Date'];
+
local Date = tidy_date( A['Date'] );
local LayDate = A['LayDate'];
+
local LayDate = tidy_date( A['LayDate'] );
 
------------------------------------------------- Get title data
 
------------------------------------------------- Get title data
 
local Title = A['Title'];
 
local Title = A['Title'];
第2,904行: 第2,911行:     
local Via = A['Via'];
 
local Via = A['Via'];
local AccessDate = A['AccessDate'];
+
local AccessDate = tidy_date( A['AccessDate'] );
local ArchiveDate = A['ArchiveDate'];
+
local ArchiveDate = tidy_date( A['ArchiveDate'] );
 
local Agency = A['Agency'];
 
local Agency = A['Agency'];
 
local DeadURL = A['DeadURL']
 
local DeadURL = A['DeadURL']
第4,008行: 第4,015行:  
 
 
if is_set(options.id) then 
 
if is_set(options.id) then 
text = '<cite id="' .. mw.uri.anchorEncode(options.id) ..'" class="' .. mw.text.nowiki(options.class) .. '">' .. text .. "</cite>";
+
text = '<cite id="' .. mw.uri.anchorEncode(options.id) ..'" class="' .. mw.text.nowiki(options.class) .. '" style="font-style:inherit">' .. text .. "</cite>";
 
else
 
else
text = '<cite class="' .. mw.text.nowiki(options.class) .. '">' .. text .. "</cite>";
+
text = '<cite class="' .. mw.text.nowiki(options.class) .. '" style="font-style:inherit">' .. text .. "</cite>";
end
+
end 
    
local empty_span = '<span style="display:none;">&nbsp;</span>';
 
local empty_span = '<span style="display:none;">&nbsp;</span>';
匿名用户

导航菜单