查看“模块:Timebomb”的源代码
←
模块:Timebomb
跳转到导航
跳转到搜索
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您必须确认您的电子邮件地址才能编辑页面。请通过
参数设置
设置并确认您的电子邮件地址。
您可以查看和复制此页面的源代码。
require('Module:No globals') local getArgs = require('Module:Arguments').getArgs local lang = mw.language.new('en') local frame = mw.getCurrentFrame() local p = { } local function length(timebomb, compiled) local ts1 = lang:formatDate('U', timebomb) local ts2 = lang:formatDate('U', compiled) return ts1 - ts2 end local function fixed(timebomb, compiled) local length = length(timebomb, compiled) local clean = frame:callParserFunction('#dateformat:' .. timebomb) if length < 0 and compiled then error('timebomb date is earlier than the compilation date') end if compiled then local msg = mw.message.new('timebomb fixed') msg:params(clean, lang:formatDuration(length, {'days'})) return msg:plain() else return clean end end local function dynamic(timebomb) local length = length(timebomb, 'now') local msg = mw.message.new('timebomb dynamic') msg:params(lang:formatDuration(length, {'days'})) return msg:plain() end function p.main(frame) local args = getArgs(frame) if not args.timebomb then return "" end if args.timebomb:byte() == 43 then return dynamic(args.timebomb) else return fixed(args.timebomb, args.compiled) end end return p
返回
模块:Timebomb
。
导航菜单
个人工具
创建账号
登录
命名空间
页面
讨论
变体
查看
阅读
查看源代码
查看历史
更多
搜索
网站
首页
论坛
下载
工具
链入页面
相关更改
特殊页面
页面信息