Bahaipedia
Bahaipedia
Menu
About Bahaipedia
Ask a question
General help
Random page
Recent changes
In other projects
Tools
What links here
Related changes
Upload file
Special pages
Printable version
Permanent link
Page information
Module
Discussion
View history
Talk
Contributions
Create account
Log in
Navigation
About Bahaipedia
Ask a question
General help
Random page
Recent changes
In other projects
Learn more
Core topics
Bahá’í Faith
Central Figures
Teachings
Practices
Tools
What links here
Related changes
Upload file
Special pages
Printable version
Permanent link
Page information
Translations

Module:BahaiNewsTest

From Bahaipedia
Jump to:navigation, search
Module documentation[create] [purge]
You might want to create a documentation page for this Scribunto module.
Editors can experiment in this module's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this module.
local module = {}

-- Define a list of issue numbers and map to date published. [1] would be Issue #1
local publicationDate_map = {
	[212]="October, 1948",
	[213]="November, 1948",
	[214]="December, 1948",
}

local maybethisway = {
	[212]  = {date = "October, 1948",       },
	[213]  = {date = "November, 1948",      },
}

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

function module.publicationDate2( frame )
	local issueNumber = tonumber(frame.args[1])
	return maybethisway[issueNumber].date
end

return module
Retrieved from "https://bahaipedia.org/index.php?title=Module:BahaiNewsTest&oldid=82282"
This page was last edited on 23 April 2020, at 04:01.
Text is available under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License.
Privacy policy
About Bahaipedia
Disclaimers
Powered by MediaWiki