| 第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;"> </span>'; | | local empty_span = '<span style="display:none;"> </span>'; |