<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wikiyouth.eu/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AWikidata_date</id>
	<title>Module:Wikidata date - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wikiyouth.eu/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AWikidata_date"/>
	<link rel="alternate" type="text/html" href="https://wikiyouth.eu/w/index.php?title=Module:Wikidata_date&amp;action=history"/>
	<updated>2026-04-15T04:17:51Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wikiyouth.eu/w/index.php?title=Module:Wikidata_date&amp;diff=35576&amp;oldid=prev</id>
		<title>Admin: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wikiyouth.eu/w/index.php?title=Module:Wikidata_date&amp;diff=35576&amp;oldid=prev"/>
		<updated>2025-04-09T08:42:56Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:42, 9 April 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wiki_wikiyouth:diff:1.41:old-35575:rev-35576 --&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://wikiyouth.eu/w/index.php?title=Module:Wikidata_date&amp;diff=35575&amp;oldid=prev</id>
		<title>en&gt;Jarekt: correction to the last edit</title>
		<link rel="alternate" type="text/html" href="https://wikiyouth.eu/w/index.php?title=Module:Wikidata_date&amp;diff=35575&amp;oldid=prev"/>
		<updated>2023-01-17T00:35:44Z</updated>

		<summary type="html">&lt;p&gt;correction to the last edit&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--[[  &lt;br /&gt;
  __  __           _       _      __        ___ _    _     _       _              _       _       &lt;br /&gt;
 |  \/  | ___   __| |_   _| | ___ \ \      / (_) | _(_) __| | __ _| |_ __ _    __| | __ _| |_ ___ &lt;br /&gt;
 | |\/| |/ _ \ / _` | | | | |/ _ (_) \ /\ / /| | |/ / |/ _` |/ _` | __/ _` |  / _` |/ _` | __/ _ \&lt;br /&gt;
 | |  | | (_) | (_| | |_| | |  __/_ \ V  V / | |   &amp;lt;| | (_| | (_| | || (_| | | (_| | (_| | ||  __/&lt;br /&gt;
 |_|  |_|\___/ \__,_|\__,_|_|\___(_) \_/\_/  |_|_|\_\_|\__,_|\__,_|\__\__,_|  \__,_|\__,_|\__\___|&lt;br /&gt;
 &lt;br /&gt;
 This module displays content of wikidata &amp;quot;time&amp;quot; properties, with special  &lt;br /&gt;
emphasis on complex dates. Dates are localized using Module:Complex_date&lt;br /&gt;
 &lt;br /&gt;
Please do not modify this code without applying the changes first &lt;br /&gt;
at Module:Wikidata date/sandbox and testing at Module:Wikidata date/sandbox/testcases.&lt;br /&gt;
 &lt;br /&gt;
Authors and maintainers:&lt;br /&gt;
* User:Jarekt -  original version &lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local cDate    = require(&amp;quot;Module:Complex date&amp;quot;) -- used for internationalization of dates&lt;br /&gt;
local ISOdate  = require(&amp;#039;Module:ISOdate&amp;#039;)._ISOdate&lt;br /&gt;
local date2jdn = require(&amp;#039;Module:Calendar&amp;#039;)._date2jdn&lt;br /&gt;
&lt;br /&gt;
-- ==================================================&lt;br /&gt;
-- === local helper functions =======================&lt;br /&gt;
-- ==================================================&lt;br /&gt;
&lt;br /&gt;
local function processFrame(frame)&lt;br /&gt;
	-- inputs in any upper or lower case&lt;br /&gt;
	local args = {}&lt;br /&gt;
	for name, value in pairs( frame.args ) do &lt;br /&gt;
		if value ~= &amp;#039;&amp;#039; then -- nuke empty strings&lt;br /&gt;
			args[string.lower(name)] = value&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	args.item = args.item or args.wikidata &lt;br /&gt;
	if not (args.lang and mw.language.isSupportedLanguage(args.lang)) then &lt;br /&gt;
		args.lang = frame:callParserFunction( &amp;quot;int&amp;quot;, &amp;quot;lang&amp;quot; ) -- get user&amp;#039;s chosen language &lt;br /&gt;
	end&lt;br /&gt;
	return args&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function formatDate(conj, date1, date2, certainty, lang)&lt;br /&gt;
	return cDate._complex_date_cer(conj, date1.adj, date1.date, date1.units, date1.era, &lt;br /&gt;
	                                       date2.adj, date2.date, date2.units, date2.era, certainty, lang)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function parse_item_snak(snak)&lt;br /&gt;
	if (snak.snaktype == &amp;quot;value&amp;quot;) then &lt;br /&gt;
		return snak.datavalue.value.id &lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function parse_time_snak(snak)&lt;br /&gt;
-- Converts a &amp;quot;time&amp;quot; snak into structure with obj.calendar, obj.date, obj.precision,  and obj.era&lt;br /&gt;
-- fields. Converts a &amp;quot;wikibase-item&amp;quot; snak into a string with q-code&lt;br /&gt;
	local obj = { date=&amp;#039;&amp;#039;, debug=&amp;#039;&amp;#039; }&lt;br /&gt;
	if (snak.snaktype == &amp;quot;value&amp;quot; and snak.datavalue.type == &amp;#039;time&amp;#039;) then &lt;br /&gt;
		local units = {[6]=&amp;#039;millennium&amp;#039;, [7]=&amp;#039;century&amp;#039;, [8]=&amp;#039;decade&amp;#039;} -- precision to units conversion&lt;br /&gt;
		local calendars = { Q1985727=&amp;#039;gregorian&amp;#039;, Q1985786=&amp;#039;julian&amp;#039;} &lt;br /&gt;
		local v = snak.datavalue.value&lt;br /&gt;
		local calendar = calendars[string.gsub(v.calendarmodel, &amp;#039;http://www.wikidata.org/entity/&amp;#039;, &amp;#039;&amp;#039;)]&lt;br /&gt;
		obj.units = units[v.precision]&lt;br /&gt;
		obj.debug = string.format(&amp;quot; (time=%s/%i, calendar=%s)&amp;quot;, v.time, v.precision, calendar) -- string used for debuging	&lt;br /&gt;
		obj.timestamp = v.time&lt;br /&gt;
		local year = tonumber(string.sub( v.time, 1, string.find( string.sub(v.time,2), &amp;#039;-&amp;#039;) ) )&lt;br /&gt;
		if year&amp;lt;0 then&lt;br /&gt;
			obj.era  = &amp;#039;BC&amp;#039;&lt;br /&gt;
		elseif year&amp;lt;100 then&lt;br /&gt;
			obj.era  = &amp;#039;AD&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
		if calendar == &amp;#039;julian&amp;#039; and year&amp;gt;1583 and year&amp;lt;1923 then &lt;br /&gt;
			obj.calendar = &amp;#039;julian&amp;#039; -- if julian calenar in a period of time usually associated with gregorian calendar&lt;br /&gt;
		end&lt;br /&gt;
		if v.precision &amp;gt;= 9 then -- assign year if precission higher than a decade&lt;br /&gt;
			obj.year = year;&lt;br /&gt;
		end&lt;br /&gt;
		local den = math.pow(10,9-v.precision)&lt;br /&gt;
		year = math.floor((math.abs(year)-1)/den)+1&lt;br /&gt;
		if v.precision &amp;gt;= 11 then                -- day&lt;br /&gt;
			obj.date = string.sub(v.time,2,11)     -- date in YYYY-MM-DD format&lt;br /&gt;
		elseif v.precision == 10 then            -- month&lt;br /&gt;
			obj.date = string.sub(v.time,2,8)      -- date in YYYY-MM format&lt;br /&gt;
		elseif v.precision == 9 then             -- year&lt;br /&gt;
			obj.date = string.sub(v.time,2,5)      -- date in YYYY format&lt;br /&gt;
		elseif v.precision == 8 then             -- decade&lt;br /&gt;
			obj.date = string.sub(v.time,2,4)..&amp;#039;0&amp;#039; -- date in YYY0 format&lt;br /&gt;
		elseif v.precision == 7 then             -- century &lt;br /&gt;
			obj.date = tostring(year) &lt;br /&gt;
		elseif v.precision == 6 then             -- millennium&lt;br /&gt;
			obj.date = tostring(year) &lt;br /&gt;
		elseif v.precision &amp;lt;= 5 then             -- millions of years&lt;br /&gt;
			obj.date = tostring(year*den) &lt;br /&gt;
		end&lt;br /&gt;
		return obj&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- ==================================================&lt;br /&gt;
-- === External functions ===========================&lt;br /&gt;
-- ==================================================&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- ===========================================================================&lt;br /&gt;
-- === Version of the function to be called from other LUA codes&lt;br /&gt;
-- ===========================================================================&lt;br /&gt;
function p._qualifierDate(snak, lang)&lt;br /&gt;
	local date1 = parse_time_snak(snak)&lt;br /&gt;
	local gregorian = 1&lt;br /&gt;
	if date1.calendar==&amp;#039;julian&amp;#039; then &lt;br /&gt;
		gregorian = 0&lt;br /&gt;
	end&lt;br /&gt;
	local jdn = date2jdn(date1.timestamp, gregorian) or 0&lt;br /&gt;
	local dateStr&lt;br /&gt;
	if (date1.calendar or date1.era or date1.units ) then -- check the main statement&lt;br /&gt;
		dateStr = formatDate(date1.calendar, date1, { date=&amp;#039;&amp;#039;, debug=&amp;#039;&amp;#039; }, &amp;#039;&amp;#039;, lang)&lt;br /&gt;
	else&lt;br /&gt;
		dateStr = ISOdate(date1.date, lang)&lt;br /&gt;
	end&lt;br /&gt;
	return {str=dateStr, year=date1.year, jdn=jdn}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._date(item, prop, lang)&lt;br /&gt;
  -- Interpret date stored in &amp;quot;item&amp;quot;&amp;#039;s &amp;quot;prop&amp;quot; property and display it using [[Module:Complex date]] &lt;br /&gt;
	-- module using language &amp;quot;lang&amp;quot;. &lt;br /&gt;
	local str, iso, year, year2return, iso2return, entity&lt;br /&gt;
	local dateTable = {}  -- table to store QuickStatements &lt;br /&gt;
	&lt;br /&gt;
	-- Step 1: clean up the input parameters&lt;br /&gt;
	if type(item)==&amp;#039;string&amp;#039; then -- &amp;quot;item&amp;quot; is a q-code&lt;br /&gt;
		entity = mw.wikibase.getEntity(item); &lt;br /&gt;
	else&lt;br /&gt;
		entity = item            -- &amp;quot;item&amp;quot; is the entity&lt;br /&gt;
	end&lt;br /&gt;
	lang = string.lower(lang) or &amp;#039;en&amp;#039; -- lang comming from p.date(frame) will be clean, others might not be&lt;br /&gt;
	&lt;br /&gt;
	-- Step 2: parse all the statements in property &amp;quot;prop&amp;quot; and call Module:Complex_data&lt;br /&gt;
	if entity and entity.claims and entity.claims[prop] then -- if we have wikidata item and item has the property&lt;br /&gt;
		for _, statement in pairs( entity:getBestStatements( prop )) do&lt;br /&gt;
			-- harvest few date-type qualifiers &lt;br /&gt;
			local data = {}&lt;br /&gt;
			&lt;br /&gt;
			-- parse time datatype properties&lt;br /&gt;
			local qualifiers = {[&amp;#039;from&amp;#039;]=&amp;#039;P580&amp;#039;, [&amp;#039;until_&amp;#039;]=&amp;#039;P582&amp;#039;, [&amp;#039;after&amp;#039;]=&amp;#039;P1319&amp;#039;, [&amp;#039;before&amp;#039;]=&amp;#039;P1326&amp;#039;}&lt;br /&gt;
			for field,qual in pairs( qualifiers ) do&lt;br /&gt;
				if statement.qualifiers and statement.qualifiers[qual] then&lt;br /&gt;
					data[field] = parse_time_snak(statement.qualifiers[qual][1])&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			&lt;br /&gt;
			-- parse item datatype properties&lt;br /&gt;
			local qualifiers = {sourcing=&amp;#039;P1480&amp;#039;, refine=&amp;#039;P4241&amp;#039;, validity=&amp;#039;P5102&amp;#039;}&lt;br /&gt;
			for field,qual in pairs( qualifiers ) do&lt;br /&gt;
				if statement.qualifiers and statement.qualifiers[qual] then&lt;br /&gt;
				  -- only one P1480 qualifier per date so no &amp;quot;presumably circa&amp;quot; dates, etc.&lt;br /&gt;
					data[field] = parse_item_snak(statement.qualifiers[qual][1])&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
						&lt;br /&gt;
			-- check on P4241 (&amp;quot;refine date&amp;quot;) and P1480 (&amp;quot;sourcing circumstances&amp;quot;) qualifiers&lt;br /&gt;
			local LUT = {              Q40719727=&amp;#039;early&amp;#039;     , Q40719748=&amp;#039;mid&amp;#039;,      Q40719766=&amp;#039;late&amp;#039;,&lt;br /&gt;
				Q40690303=&amp;#039;1quarter&amp;#039; , Q40719649=&amp;#039;2quarter&amp;#039;  , Q40719662=&amp;#039;3quarter&amp;#039;, Q40719674=&amp;#039;4quarter&amp;#039;,&lt;br /&gt;
				Q40720559=&amp;#039;spring&amp;#039;   , Q40720564=&amp;#039;summer&amp;#039;    , Q40720568=&amp;#039;autumn&amp;#039;  , Q40720553=&amp;#039;winter&amp;#039;,&lt;br /&gt;
				Q40719687=&amp;#039;firsthalf&amp;#039;, Q40719707=&amp;#039;secondhalf&amp;#039;, Q5727902=&amp;#039;circa&amp;#039;,&lt;br /&gt;
				Q56644435=&amp;#039;probably&amp;#039;,  Q18122778=&amp;#039;presumably&amp;#039;, Q30230067=&amp;#039;possibly&amp;#039; }&lt;br /&gt;
			local adj       = LUT[data.refine]    -- check on P4241 (&amp;quot;refine date&amp;quot;) item-type qualifier&lt;br /&gt;
			local certainty = LUT[data.sourcing] or LUT[data.validity] -- check on P1480 (&amp;quot;sourcing circumstances&amp;quot;) item-type qualifier&lt;br /&gt;
			if data.sourcing and not certainty then&lt;br /&gt;
				certainty = &amp;#039;uncertain&amp;#039; &lt;br /&gt;
			end&lt;br /&gt;
&lt;br /&gt;
			-- initialize&lt;br /&gt;
			local nulDate = { date=&amp;#039;&amp;#039;, debug=&amp;#039;&amp;#039; } -- nul parameter to pass to formatDate&lt;br /&gt;
			local dateStr = nil&lt;br /&gt;
			&lt;br /&gt;
			-- check &amp;#039;P580&amp;#039; (&amp;quot;start time&amp;quot; aka &amp;quot;from&amp;quot; &amp;quot;since&amp;quot;) and &amp;#039;P582&amp;#039; (&amp;quot;end time&amp;quot; aka &amp;quot;until&amp;quot;) qualifiers:&lt;br /&gt;
			if data.from and data.until_ then&lt;br /&gt;
				dateStr = formatDate(&amp;#039;from-until&amp;#039;, data.from, data.until_, certainty, lang)&lt;br /&gt;
				if data.from.year==data.until_.year then&lt;br /&gt;
					year = data.from.year&lt;br /&gt;
				end&lt;br /&gt;
			elseif data.from and not data.from.calendar then&lt;br /&gt;
				data.from.adj = adj&lt;br /&gt;
				dateStr = formatDate(&amp;#039;from&amp;#039;, data.from, nulDate, certainty, lang)&lt;br /&gt;
			elseif data.from then&lt;br /&gt;
				data.from.adj = &amp;#039;from&amp;#039;&lt;br /&gt;
				dateStr = formatDate(data.from.calendar, data.from, nulDate, certainty, lang)&lt;br /&gt;
			elseif data.until_ and not data.until_.calendar then&lt;br /&gt;
				data.until_.adj = adj&lt;br /&gt;
				dateStr = formatDate(&amp;#039;until&amp;#039;, data.until_, nulDate, certainty, lang)&lt;br /&gt;
			elseif data.until_ then&lt;br /&gt;
				data.until_.adj = &amp;#039;until&amp;#039;&lt;br /&gt;
				dateStr = formatDate(data.until_.calendar, data.until_, nulDate, certainty, lang)			&lt;br /&gt;
			end&lt;br /&gt;
			&lt;br /&gt;
			-- check &amp;#039;P1319&amp;#039; (&amp;quot;earliest date&amp;quot; aka &amp;quot;after this date&amp;quot;) and &amp;#039;P1326&amp;#039; (&amp;quot;latest date&amp;quot; aka &amp;quot;before this date&amp;quot;) qualifiers:&lt;br /&gt;
			if data.after and data.before and certainty==&amp;#039;circa&amp;#039; then&lt;br /&gt;
				dateStr = formatDate(&amp;#039;circa&amp;#039;, data.after, data.before, &amp;#039;&amp;#039;, lang) --module:Complex_date has custom 2-date &amp;quot;circa&amp;quot; option based on &amp;quot;between&amp;quot; option&lt;br /&gt;
				if data.after.year==data.before.year then&lt;br /&gt;
					year = data.before.year&lt;br /&gt;
				end&lt;br /&gt;
			elseif data.after and data.before then&lt;br /&gt;
				dateStr = formatDate(&amp;#039;between&amp;#039;, data.after, data.before, certainty, lang)&lt;br /&gt;
				if data.after.year==data.before.year then&lt;br /&gt;
					year = data.before.year&lt;br /&gt;
				end&lt;br /&gt;
			elseif data.after and data.after.calendar then&lt;br /&gt;
				data.after.adj = &amp;#039;after&amp;#039;&lt;br /&gt;
				dateStr = formatDate(data.after.calendar, data.after, nulDate, certainty, lang)&lt;br /&gt;
			elseif data.after then&lt;br /&gt;
				data.after.adj = adj&lt;br /&gt;
				dateStr = formatDate(&amp;#039;after&amp;#039;, data.after, nulDate, certainty, lang)&lt;br /&gt;
			elseif data.before and data.before.calendar then&lt;br /&gt;
				data.before.adj = &amp;#039;before&amp;#039;&lt;br /&gt;
				dateStr = formatDate(data.before.calendar, data.before, nulDate, certainty, lang)&lt;br /&gt;
			elseif data.before then&lt;br /&gt;
				data.before.adj = adj&lt;br /&gt;
				dateStr = formatDate(&amp;#039;before&amp;#039;, data.before, nulDate, certainty, lang)&lt;br /&gt;
			end&lt;br /&gt;
			&lt;br /&gt;
			-- if no above qualifiers than look at the main snack&lt;br /&gt;
			if not dateStr then&lt;br /&gt;
				data.main = parse_time_snak(statement.mainsnak)&lt;br /&gt;
				if data.main then&lt;br /&gt;
					year = data.main.year&lt;br /&gt;
					if (data.main.calendar or adj or data.main.era or data.main.units or certainty ) then -- check the main statement&lt;br /&gt;
						data.main.adj = adj&lt;br /&gt;
						dateStr = formatDate(data.main.calendar, data.main, nulDate, certainty, lang)&lt;br /&gt;
					else&lt;br /&gt;
						iso     = data.main.date&lt;br /&gt;
						dateStr = ISOdate(iso, lang)&lt;br /&gt;
					end&lt;br /&gt;
				end	&lt;br /&gt;
			end&lt;br /&gt;
	&lt;br /&gt;
			table.insert( dateTable, dateStr)&lt;br /&gt;
			if not year2return then&lt;br /&gt;
				year2return = year&lt;br /&gt;
			elseif year2return and year2return~=year then&lt;br /&gt;
				year2return = nil -- if years conflict than nul&lt;br /&gt;
			end&lt;br /&gt;
			if not iso2return then&lt;br /&gt;
				iso2return = iso&lt;br /&gt;
			elseif iso2return then&lt;br /&gt;
				iso2return = nil -- if date conflict than nul&lt;br /&gt;
			end&lt;br /&gt;
&lt;br /&gt;
		end -- for loop&lt;br /&gt;
	end -- if entity then&lt;br /&gt;
	&lt;br /&gt;
	local dateStr = mw.text.trim(table.concat( dateTable, &amp;#039; / &amp;#039;))&lt;br /&gt;
	if dateStr==&amp;#039;&amp;#039; then dateStr=nil; end&lt;br /&gt;
	return {str=dateStr, year=year2return, iso=iso2return}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- ===========================================================================&lt;br /&gt;
-- === Functions to be called from template namespace&lt;br /&gt;
-- ===========================================================================&lt;br /&gt;
function p.date(frame)&lt;br /&gt;
	local args = processFrame(frame)&lt;br /&gt;
	local result = p._date(args.item, args.property, args.lang)&lt;br /&gt;
	return result.str or &amp;#039;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.year(frame)  -- return only year string&lt;br /&gt;
	local args = processFrame(frame)&lt;br /&gt;
	local result = p._date(args.item, args.property, args.lang)&lt;br /&gt;
	return tostring(result.year) or &amp;#039;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.isoDate(frame)  -- return only year string&lt;br /&gt;
	local args = processFrame(frame)&lt;br /&gt;
	local result = p._date(args.item, args.property, args.lang)&lt;br /&gt;
	return result.iso or &amp;#039;nil&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.timestamp(frame) &lt;br /&gt;
  -- debuging function which might go away&lt;br /&gt;
	local entity = mw.wikibase.getEntity(frame.args.item); &lt;br /&gt;
	local dateTable = {}  -- table to store QuickStatements &lt;br /&gt;
	if entity and entity.claims and entity.claims[frame.args.property] then -- if we have wikidata item and item has the property&lt;br /&gt;
		for _, statement in pairs( entity:getBestStatements( frame.args.property )) do&lt;br /&gt;
			local snak = statement.mainsnak&lt;br /&gt;
			if (snak.snaktype == &amp;quot;value&amp;quot; and snak.datavalue.type == &amp;#039;time&amp;#039;) then &lt;br /&gt;
				local v = snak.datavalue.value&lt;br /&gt;
				table.insert( dateTable, v.time ..&amp;#039;/&amp;#039; .. v.precision)&lt;br /&gt;
			end&lt;br /&gt;
		end -- for loop&lt;br /&gt;
	end -- if entity then&lt;br /&gt;
	return table.concat( dateTable, &amp;#039; / &amp;#039;) or &amp;#039;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>en&gt;Jarekt</name></author>
	</entry>
</feed>