<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="he">
	<id>https://text.chabadpedia.com/index.php?action=history&amp;feed=atom&amp;title=%D7%99%D7%97%D7%99%D7%93%D7%94%3A%D7%98%D7%95%D7%95%D7%97_%D7%96%D7%9E%D7%A0%D7%99%D7%9D</id>
	<title>יחידה:טווח זמנים - היסטוריית גרסאות</title>
	<link rel="self" type="application/atom+xml" href="https://text.chabadpedia.com/index.php?action=history&amp;feed=atom&amp;title=%D7%99%D7%97%D7%99%D7%93%D7%94%3A%D7%98%D7%95%D7%95%D7%97_%D7%96%D7%9E%D7%A0%D7%99%D7%9D"/>
	<link rel="alternate" type="text/html" href="https://text.chabadpedia.com/index.php?title=%D7%99%D7%97%D7%99%D7%93%D7%94:%D7%98%D7%95%D7%95%D7%97_%D7%96%D7%9E%D7%A0%D7%99%D7%9D&amp;action=history"/>
	<updated>2026-05-11T09:29:35Z</updated>
	<subtitle>היסטוריית הגרסאות של הדף הזה בוויקי</subtitle>
	<generator>MediaWiki 1.40.3</generator>
	<entry>
		<id>https://text.chabadpedia.com/index.php?title=%D7%99%D7%97%D7%99%D7%93%D7%94:%D7%98%D7%95%D7%95%D7%97_%D7%96%D7%9E%D7%A0%D7%99%D7%9D&amp;diff=23755&amp;oldid=prev</id>
		<title>מ. רובין: גרסה אחת יובאה</title>
		<link rel="alternate" type="text/html" href="https://text.chabadpedia.com/index.php?title=%D7%99%D7%97%D7%99%D7%93%D7%94:%D7%98%D7%95%D7%95%D7%97_%D7%96%D7%9E%D7%A0%D7%99%D7%9D&amp;diff=23755&amp;oldid=prev"/>
		<updated>2025-09-07T08:02:30Z</updated>

		<summary type="html">&lt;p&gt;גרסה אחת יובאה&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;he&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;→ הגרסה הקודמת&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;גרסה מ־11:02, 7 בספטמבר 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;he&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(אין הבדלים)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>מ. רובין</name></author>
	</entry>
	<entry>
		<id>https://text.chabadpedia.com/index.php?title=%D7%99%D7%97%D7%99%D7%93%D7%94:%D7%98%D7%95%D7%95%D7%97_%D7%96%D7%9E%D7%A0%D7%99%D7%9D&amp;diff=23754&amp;oldid=prev</id>
		<title>ויקיטקסט&gt;Effib: משמש תבניות</title>
		<link rel="alternate" type="text/html" href="https://text.chabadpedia.com/index.php?title=%D7%99%D7%97%D7%99%D7%93%D7%94:%D7%98%D7%95%D7%95%D7%97_%D7%96%D7%9E%D7%A0%D7%99%D7%9D&amp;diff=23754&amp;oldid=prev"/>
		<updated>2022-05-12T11:13:07Z</updated>

		<summary type="html">&lt;p&gt;משמש תבניות&lt;/p&gt;
&lt;p&gt;&lt;b&gt;דף חדש&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local Date = require(&amp;#039;Module:תאריך&amp;#039;)&lt;br /&gt;
local Arguments = require( &amp;quot;Module:Arguments&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
local function WikidataSimpleFill(parameter, entityId, property) &lt;br /&gt;
	-- this doesnt handle unkown values, multi value etc&lt;br /&gt;
	if parameter~=nil then return parameter, false end&lt;br /&gt;
	local wikidataVal = mw.wikibase.getBestStatements( entityId, property )&lt;br /&gt;
	if #wikidataVal &amp;gt; 0 then&lt;br /&gt;
		local propValue = wikidataVal[1].mainsnak&lt;br /&gt;
		return mw.wikibase.renderSnak( propValue ) , true&lt;br /&gt;
	end&lt;br /&gt;
	return nil, false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function render(frame)&lt;br /&gt;
	local args = Arguments.getArgs(frame, { [&amp;#039;trim&amp;#039;] = true, [&amp;#039;removeBlanks&amp;#039;] = true })&lt;br /&gt;
	local res = &amp;#039;&amp;#039;&lt;br /&gt;
	&lt;br /&gt;
	local entityId = args[&amp;#039;qid&amp;#039;] or mw.wikibase.getEntityIdForCurrentPage()&lt;br /&gt;
	if (entityId == &amp;#039;-&amp;#039; or entityId==&amp;#039;&amp;#039;) then entityId = nil end&lt;br /&gt;
	local pointInTime = args[&amp;#039;נקודת זמן&amp;#039;]&lt;br /&gt;
	local startDate = args[&amp;#039;תאריך התחלה&amp;#039;]&lt;br /&gt;
	local endDate = args[&amp;#039;תאריך סיום&amp;#039;]&lt;br /&gt;
	&lt;br /&gt;
	local wikidataStartDate = args[&amp;#039;תאריך התחלה-ויקינתונים&amp;#039;] or &amp;#039;P580&amp;#039;&lt;br /&gt;
	local wikidataEndDate = args[&amp;#039;תאריך סיום-ויקינתונים&amp;#039;] or &amp;#039;P582&amp;#039;&lt;br /&gt;
	local showEditWikidata = true&lt;br /&gt;
	&lt;br /&gt;
	-- text to show if we have only end date. Example: &amp;quot;Last even - %s&amp;quot; where %s is time. nil - will not show end date&lt;br /&gt;
	local onlyEndDateText = args[&amp;#039;טקסט סיום&amp;#039;]&lt;br /&gt;
	&lt;br /&gt;
	local duration = args[&amp;#039;משך&amp;#039;] --P2047&lt;br /&gt;
	-- Whether to show time diff between start and end day when applicable. Example: כן.&lt;br /&gt;
	local showTimeDiff = args[&amp;#039;הצגת הפרשת זמנים&amp;#039;]&lt;br /&gt;
	local dateRangeDiffFormat = args[&amp;#039;פורמט הצגה&amp;#039;] or &amp;#039;%s (%s)&amp;#039;&lt;br /&gt;
&lt;br /&gt;
	local usingWikidata = false&lt;br /&gt;
	&lt;br /&gt;
	if  entityId~=nil then&lt;br /&gt;
		-- todo: support different fallbacks for properties&lt;br /&gt;
		local usingWikidataStartDate = false&lt;br /&gt;
		local usingWikidataEndDate = false&lt;br /&gt;
		local usingWikidataPointInTime = false&lt;br /&gt;
		local usingWikidataDuration = false&lt;br /&gt;
		&lt;br /&gt;
		wikidataStartDate = mw.text.split( wikidataStartDate, &amp;#039; *, *&amp;#039;, false )&lt;br /&gt;
		wikidataEndDate = mw.text.split( wikidataEndDate, &amp;#039; *, *&amp;#039;, false )&lt;br /&gt;
		for _, wikidataStartProp in pairs(wikidataStartDate) do&lt;br /&gt;
			startDate, usingWikidataStartDate = WikidataSimpleFill(startDate, entityId, wikidataStartProp )&lt;br /&gt;
		end&lt;br /&gt;
		for _, wikidataEndProp in pairs(wikidataEndDate) do&lt;br /&gt;
			endDate, usingWikidataEndDate = WikidataSimpleFill(endDate, entityId, wikidataEndProp )&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		usingWikidata = usingWikidata or usingWikidataStartDate or usingWikidataEndDate&lt;br /&gt;
		if startDate == nil and endDate == nil then&lt;br /&gt;
			pointInTime, usingWikidataPointInTime  = WikidataSimpleFill(pointInTime, entityId, &amp;#039;P585&amp;#039; )&lt;br /&gt;
			usingWikidata = usingWikidata or usingWikidataPointInTime&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if showTimeDiff == &amp;#039;כן&amp;#039; then&lt;br /&gt;
			duration, usingWikidataDuration = WikidataSimpleFill(duration, entityId, &amp;#039;P2047&amp;#039; )&lt;br /&gt;
			if usingWikidataDuration then &lt;br /&gt;
				-- workaround for T261543&lt;br /&gt;
				duration = mw.ustring.gsub( duration, &amp;#039;(%d+) יממה&amp;#039;, &amp;#039;%1 ימים&amp;#039; )&lt;br /&gt;
			end&lt;br /&gt;
			usingWikidata = usingWikidata or usingWikidataDuration&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Whether the event still continues. this will show &amp;lt;START&amp;gt;-present. Example: כן&lt;br /&gt;
	local defaultOngoingEvent = args[&amp;#039;נמשך&amp;#039;] == &amp;#039;כן&amp;#039;&lt;br /&gt;
	local ongoingEvent = defaultOngoingEvent&lt;br /&gt;
	local endDateOngoingEvent = args[&amp;#039;הווה&amp;#039;]&lt;br /&gt;
	local presentText = args[&amp;#039;טקסט הווה&amp;#039;]&lt;br /&gt;
	local diffFormat = &amp;#039;auto&amp;#039; -- TODO: better handling for different scales&lt;br /&gt;
	&lt;br /&gt;
	if  endDate~=nil and endDate~=&amp;#039;&amp;#039; then&lt;br /&gt;
		if endDateOngoingEvent~=nil then&lt;br /&gt;
			-- set default ongoingEvent as false&lt;br /&gt;
			ongoingEvent = false&lt;br /&gt;
			for v in string.gmatch(endDateOngoingEvent, &amp;quot;[^,%s]+&amp;quot;) do&lt;br /&gt;
				if v == endDate then&lt;br /&gt;
					-- set as true if end date specific that match endDateOngoingEvent&lt;br /&gt;
					ongoingEvent = true&lt;br /&gt;
					if presentText then endDate=presentText end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			-- explicity end date was specified, hence it is not ongoing&lt;br /&gt;
			ongoingEvent = false&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- simple case of single point in time&lt;br /&gt;
	if pointInTime~=nil  or  startDate==endDate then&lt;br /&gt;
		if pointInTime == nil and startDate==endDate  then&lt;br /&gt;
			pointInTime = startDate&lt;br /&gt;
		end&lt;br /&gt;
		res = pointInTime&lt;br /&gt;
	else -- date ranges&lt;br /&gt;
		if startDate == nil and endDate~=nil  then&lt;br /&gt;
			if onlyEndDateText == nil then return end -- ignore only end date&lt;br /&gt;
			res = mw.ustring.format(onlyEndDateText, endDate)&lt;br /&gt;
		elseif startDate ~= nil and (endDate==nil or (ongoingEvent and endDate~=nil))  then&lt;br /&gt;
			if ongoingEvent then&lt;br /&gt;
				dateFormat = &amp;#039;%s–%s&amp;#039;&lt;br /&gt;
				if mw.ustring.match(startDate, &amp;#039; &amp;#039;) or (endDate and mw.ustring.match(endDate, &amp;#039; &amp;#039;)) then&lt;br /&gt;
					dateFormat = &amp;#039;%s – %s&amp;#039;&lt;br /&gt;
				end&lt;br /&gt;
				res = mw.ustring.format(dateFormat, startDate, endDate or &amp;#039;הווה&amp;#039;)&lt;br /&gt;
				-- try to fallback to automatic duration if duration is not available&lt;br /&gt;
				if showTimeDiff == &amp;#039;כן&amp;#039; and duration==nil then&lt;br /&gt;
					local success, automaicDuration = pcall(Date.parseDateRange, startDate, diffFormat, true)&lt;br /&gt;
					if success then duration = automaicDuration end&lt;br /&gt;
				end&lt;br /&gt;
			else&lt;br /&gt;
				res = startDate&lt;br /&gt;
			end&lt;br /&gt;
		elseif startDate~=nil and endDate~=nil  then&lt;br /&gt;
			dateFormat = &amp;#039;%s–%s&amp;#039;&lt;br /&gt;
			if mw.ustring.match(startDate, &amp;#039; &amp;#039;) or mw.ustring.match(endDate, &amp;#039; &amp;#039;) then&lt;br /&gt;
				dateFormat = &amp;#039;%s – %s&amp;#039;&lt;br /&gt;
			end&lt;br /&gt;
			res = mw.ustring.format(dateFormat, startDate, endDate)&lt;br /&gt;
			if showTimeDiff == &amp;#039;כן&amp;#039; and duration==nil then&lt;br /&gt;
				local success, automaicDuration = pcall(Date.parseDateRange, res, diffFormat, true)&lt;br /&gt;
				if success then duration = automaicDuration end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- append the duration&lt;br /&gt;
	if showTimeDiff == &amp;#039;כן&amp;#039; and duration~=nil and duration~=&amp;#039;&amp;#039; and res~=nil then&lt;br /&gt;
		res = mw.ustring.format(dateRangeDiffFormat, res, duration)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if showEditWikidata and usingWikidata and res~=nil and res~=&amp;#039;&amp;#039; and entityId~=nil then&lt;br /&gt;
		local link = mw.title.makeTitle( 0, entityId, &amp;#039;&amp;#039;, &amp;#039;wikidata&amp;#039; ):fullUrl(&amp;#039;uselang=he&amp;#039;)&lt;br /&gt;
		res = res .. mw.ustring.format(&amp;#039; [[File:Blue pencil RTL.svg|15px|link=%s|עריכת הנתון בוויקינתונים]]&amp;#039;, link)&lt;br /&gt;
	end&lt;br /&gt;
	return res&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return 	{&lt;br /&gt;
	[&amp;#039;טווח זמנים&amp;#039;]=render&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>ויקיטקסט&gt;Effib</name></author>
	</entry>
</feed>