Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a24f350699df227c

Jump to content

Module:TFA subpage transcluder

From Wikipedia, the free encyclopedia

local p = {}
local Date = require('Module:Date')._Date
local getArgs = require('Module:Arguments').getArgs

function p.main(frame)
	local args = getArgs(frame) -- get the args
	local currentProcessingDate = Date(args[1]) -- init the current processing date
	-- set up the date to stop processing; default to seven days from today:
	local endProcessingDate = args[2] and Date(args[2]) or (Date('currentdate') + '7 days')
	local dummy = '' -- dummy variable (only used so we Do Something with each date transclusion)
	local count = 0 -- init the days counter
	
	while currentProcessingDate <= endProcessingDate do
		dummy = mw.title.new('Template:TFA title/' .. currentProcessingDate:text('mdy')).content
		count = count + 1 -- increment the count of pages checked
		currentProcessingDate = currentProcessingDate + '1 day' -- move on the the next day
	end
	
	return count
end

return p