Khác biệt giữa bản sửa đổi của “Mô đun:Thử”
Nội dung được xóa Nội dung được thêm vào
Không có tóm lược sửa đổi Thẻ: Đã bị lùi lại |
Không có tóm lược sửa đổi Thẻ: Đã bị lùi lại |
||
Dòng 1:
local yesno = require('
local lang = mw.language.getContentLanguage()
local N_YEAR_DIGITS = 12
Dòng 242:
if bc then
local bcLower = type(bc) == 'string' and bc:lower()
if bcLower == 'bc' or bcLower == 'bce' or bcLower == 'tcn' then
if self.year and self.year > 0 then
self.year = -self.year
end
elseif bcLower ~= 'ad' and bcLower ~= 'ce' and bclower ~= 'scn' then
error(string.format(
"'%s' is not a valid era code (expected 'BC', 'BCE', 'AD'
tostring(bc)
), 0)
Dòng 442:
local hasMonth = self.month and self.format:find('m')
local hasDay = self.day and self.format:find('d')
local ret = {}
if hasDay and hasMonth
ret[#ret + 1] = self.day .. ' ' .. self:getMonthName()
end▼
elseif hasDay then
ret[#ret + 1] = self.day
Hàng 462 ⟶ 454:
if hasYear then
if hasDay or hasMonth then
ret[#ret + 1] = '
end
local displayYear = math.abs(self.year)
Hàng 472 ⟶ 464:
ret[#ret + 1] = displayYear
if self.year < 0 then
ret[#ret + 1] = '
end
end
return table.concat(ret)
function Dts:renderTrackingCategories()
if self.hasDeprecatedParameters then
return '[[Thể loại:Dts templates with deprecated parameters]]'
else
return ''
end
end
Dòng 515:
else
ret = string.format(
'<strong class="error">
ret
)
if mw.title.getCurrentTitle().namespace == 0 then
-- Only categorise in the main namespace
ret = ret .. '[[
end
return ret
Dòng 527:
function p.main(frame)
local args = require('
return p._main(args)
end
|