- 致编者:请牢记我们的域名wiki.mcbe-dev.net!
- 致编者:欢迎加入本Wiki的官方交流QQ群或Discord服务器!
- 基岩版1.19.31现已发布!(了解更多)
- Inner Core现已支持Xbox模组联机!(了解更多)
- 如果您是第一次来到本Wiki,欢迎注册一个账户
- 点击顶部的“编辑”或“编辑源代码”按钮即可编辑当前页面
- 请知悉:在不登录时也可以编辑和新建页面,但是您当前的IP地址会记录在编辑历史中
Module:Sandbox list
来自Minecraft基岩版开发Wiki
local p = {}
function p.main()
local f = mw.getCurrentFrame()
local dpl = f:preprocess [==[{{#dpl:
|titleregexp=沙盒¦Sandbox/
|namespace={{NAMESPACE}}
|noresultsheader=没有子页面
|format=,¶* [[%PAGE%]]<br>最后编辑于:%DATE%:,,
|ordermethod=lastedit
|addeditdate=true
|userdateformat=U
}}]==]
local subst = function(...)
-- Unix timestamp
local prefix, time = ...
if type(time) == 'string' then
time = os.difftime(os.time() + 3600 * 8, tonumber(time)) -- seconds between UTC and CST is 3600 * 8
return prefix .. mw.getContentLanguage():formatDuration(time, { 'years', 'weeks', 'days', 'hours', 'minutes' }) .. '前'
else
return prefix .. time
end
end
local result = dpl:gsub('(最后编辑于):(%d+):', subst)
return result
end
return p