首页
随机
登录
设置
关于NeuroWiki
免责声明
NeuroWiki
搜索
查看“Module:DateTitleList”的源代码
←
Module:DateTitleList
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您必须确认您的电子邮件地址才能编辑页面。请通过
参数设置
设置并确认您的电子邮件地址。
您可以查看和复制此页面的源代码。
local function formatDate(date, title, year, baseYear) local dateYear = string.sub(date, 1, 4) -- 获取年份 local monthDay = os.date("%m月%d日", os.time{ year = tonumber(dateYear), month = tonumber(string.sub(date, 5, 6)), day = tonumber(string.sub(date, 7, 8)) }) -- 构造分类链接 local categoryLink = '<span class="date-link">[[:Category:' .. monthDay .. '|' .. monthDay .. ']]</span>' -- 如果年份不同于baseYear,添加小号年份 if dateYear ~= baseYear then categoryLink = '<span class="date-link">[[:Category:' .. monthDay .. '|{{ruby|' .. monthDay .. '|<span class="small-year">' .. dateYear .. '年</span>}}]]</span>' end -- 构造页面链接 local pageLink = "[[直播记录/vedal987频道/" .. dateYear .. "年" .. monthDay .. "|" .. title .. "]]" return "* '''" .. categoryLink .. "''' " .. pageLink end
该页面使用的模板:
Module:DateTitleList/doc
(
查看源代码
)
返回
Module:DateTitleList
。