Bahaimedia
Bahaimedia
Menu
About
Help
Random Image
Recent changes
In other projects
Tools
What links here
Related changes
Special pages
Printable version
Permanent link
Page information
Module
Discussion
View history
Talk
Contributions
Create account
Log in
Navigation
About
Help
Random Image
Recent changes
In other projects
Get involved
Join the project
Media statistics
Latest Files
Upload Files
Tools
What links here
Related changes
Special pages
Printable version
Permanent link
Page information

Module:BahaiWorld

Jump to:navigation, search

Note: If you make changes to this module please also update Module:BahaiWorld on bahaipedia.org.


local module = {}

-- Define a list of volume numbers and map to the pdf page offset
local pdfOffset_map = {
	[1]="0", 
	[2]="17",
	[3]="13",
	[4]="20", 
	[5]="26",
	[6]="29",
	[7]="21",
	[8]="34",
	[9]="29", 
	[10]="25", 
	[11]="24", 
	[12]="30", 
	[13]="41", 
	[14]="25",
	[15]="24",
	[16]="19",
	[17]="20",
	[18]="21",
	[19]="24",
	[20]="32",
	[21]="1", 
	[22]="8", 
	[23]="9", 
	[24]="7", 
	[25]="5", 
	[26]="8", 
	[27]="2", 
	[28]="0", 
	[29]="2", 
	[30]="-1", 
	[31]="1", 
	[32]="1", 
	[33]="1", 
	[34]="1", 
}

local publicationDate_map = {
	[1]="1926", 
	[2]="1928",
	[3]="1930",
	[4]="1933",
	[5]="1936",
	[6]="1937",
	[7]="1939",
	[8]="1942",
	[9]="1945",
	[10]="1949",
	[11]="1952?",
	[12]="1956",
	[13]="1970",
	[14]="1974",
	[15]="1976",
	[16]="1978",
	[17]="1981",
	[18]="1986",
	[19]="1994",
	[20]="1998",
	[21]="1993", 
	[22]="1994", 
	[23]="1996", 
	[24]="1997", 
	[25]="1998", 
	[26]="1999", 
	[27]="2000", 
	[28]="2001", 
	[29]="2002", 
	[30]="2003", 
	[31]="2004", 
	[32]="2005", 
	[33]="2006", 
	[34]="2007", 
}

local volumeYearsCovered_map = {
	[1]="1925-1926", 
	[2]="1926-1928",
	[3]="1928-1930",
	[4]="1930-1932",
	[5]="1932-1934",
	[6]="1934-1936",
	[7]="1936-1938",
	[8]="1938-1940",
	[9]="1940-1944",
	[10]="1944-1946",
	[11]="1946-1950",
	[12]="1950-1954",
	[13]="1954-1963",
	[14]="1963-1968",
	[15]="1968-1973",
	[16]="1973-1976",
	[17]="1976-1979",
	[18]="1979-1983",
	[19]="1983-1986",
	[20]="1986-1992",
	[21]="1992-1993", 
	[22]="1993-1994", 
	[23]="1994-1995", 
	[24]="1995-1996", 
	[25]="1996-1997", 
	[26]="1997-1998", 
	[27]="1998-1999", 
	[28]="1999-2000", 
	[29]="2000-2001", 
	[30]="2001-2002", 
	[31]="2002-2003", 
	[32]="2003-2004", 
	[33]="2004-2005", 
	[34]="2005-2006", 
}


-- Accept the input as the volume number, return date published
function module.publicationDate( frame )
	local volNumber = tonumber(frame.args[1])
	return publicationDate_map[volNumber]
end

-- Accept the input as volume number, return pdf page number offset
function module.pdfOffset( frame )
	local volumeNumber = tonumber(frame.args[1])
	return pdfOffset_map[volumeNumber]
end

-- Accept the input as volume number, return pdf page number offset
function module.volumeYearsCovered( frame )
	local vNumber = tonumber(frame.args[1])
	return volumeYearsCovered_map[vNumber]
end

return module
Retrieved from "https://bahai.media/index.php?title=Module:BahaiWorld&oldid=123604"
This page was last edited on 24 July 2024, at 22:42.
Content is available under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License unless otherwise noted.
Privacy policy
About Bahaimedia
Disclaimers
Powered by MediaWiki