Jump to content

Module:Archive index and Module:Archive index/sandbox: Difference between pages

(Difference between pages)
Page 1
Page 2
Content deleted Content added
Add support for leading_zeros=
 
No edit summary
 
Line 93: Line 93:
if mask:find("<#>") then
if mask:find("<#>") then
local archivecount = 0
local archivecount = 0
while true do
while os.clock() < 9 do
archivecount = archivecount + 1
archivecount = archivecount + 1
local archivesuffix = tostring(archivecount)
local archivesuffix = tostring(archivecount)
archivesuffix = string.rep("0", leading_zeros - #archivesuffix + 1) .. archivesuffix
archivesuffix = string.rep("0", leading_zeros - #archivesuffix + 1) .. tostring(archivecount)
local title = mw.title.new(mask:gsub("<#>",tostring(archivesuffix)))
local title = mw.title.new(mask:gsub("<#>",tostring(archivesuffix)))
if not title.exists then
if not title.exists then