<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://mcbbs.wiki/index.php?action=history&amp;feed=atom&amp;title=%E5%BE%AE%E4%BB%B6%3ATimeSinceLastEdit</id>
	<title>微件:TimeSinceLastEdit - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://mcbbs.wiki/index.php?action=history&amp;feed=atom&amp;title=%E5%BE%AE%E4%BB%B6%3ATimeSinceLastEdit"/>
	<link rel="alternate" type="text/html" href="https://mcbbs.wiki/index.php?title=%E5%BE%AE%E4%BB%B6:TimeSinceLastEdit&amp;action=history"/>
	<updated>2026-05-12T00:13:04Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.40.3</generator>
	<entry>
		<id>https://mcbbs.wiki/index.php?title=%E5%BE%AE%E4%BB%B6:TimeSinceLastEdit&amp;diff=39136&amp;oldid=prev</id>
		<title>QWERTY770：​// Edit via Wikiplus</title>
		<link rel="alternate" type="text/html" href="https://mcbbs.wiki/index.php?title=%E5%BE%AE%E4%BB%B6:TimeSinceLastEdit&amp;diff=39136&amp;oldid=prev"/>
		<updated>2022-10-05T01:54:20Z</updated>

		<summary type="html">&lt;p&gt;// Edit via Wikiplus&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;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2022年10月5日 (三) 09:54的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;第1行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第1行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;本 &lt;/del&gt;Widget &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;用于支持 TimeSinceLastEdit 的功能。非一般情况下请勿使用。&lt;/del&gt;&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt;&amp;lt;!--{if !isset($wgTimeSinceLastEdit) || !$wgTimeSinceLastEdit}--&amp;gt;&amp;lt;!--{assign var=&quot;wgTimeSinceLastEdit&quot; value=true scope=&quot;global&quot;}--&amp;gt;&amp;lt;script&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;已弃用，请使用[[&lt;/ins&gt;Widget&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:TimeDiff]]。&lt;/ins&gt;&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt;&amp;lt;!--{if !isset($wgTimeSinceLastEdit) || !$wgTimeSinceLastEdit}--&amp;gt;&amp;lt;!--{assign var=&quot;wgTimeSinceLastEdit&quot; value=true scope=&quot;global&quot;}--&amp;gt;&amp;lt;script&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;window.RLQ = window.RLQ || [];&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;window.RLQ = window.RLQ || [];&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;window.RLQ.push(function() {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;window.RLQ.push(function() {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mcbbs_wiki:diff::1.12:old-3813:rev-39136 --&gt;
&lt;/table&gt;</summary>
		<author><name>QWERTY770</name></author>
	</entry>
	<entry>
		<id>https://mcbbs.wiki/index.php?title=%E5%BE%AE%E4%BB%B6:TimeSinceLastEdit&amp;diff=3813&amp;oldid=prev</id>
		<title>Sheep-realms：​创建页面，内容为“&lt;noinclude&gt;本 Widget 用于支持 TimeSinceLastEdit 的功能。非一般情况下请勿使用。&lt;/noinclude&gt;&lt;includeonly&gt;&lt;!--{if !isset($wgTimeSinceLastEdit) || !$…”</title>
		<link rel="alternate" type="text/html" href="https://mcbbs.wiki/index.php?title=%E5%BE%AE%E4%BB%B6:TimeSinceLastEdit&amp;diff=3813&amp;oldid=prev"/>
		<updated>2020-04-20T05:16:39Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“&amp;lt;noinclude&amp;gt;本 Widget 用于支持 TimeSinceLastEdit 的功能。非一般情况下请勿使用。&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt;&amp;lt;!--{if !isset($wgTimeSinceLastEdit) || !$…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;noinclude&amp;gt;本 Widget 用于支持 TimeSinceLastEdit 的功能。非一般情况下请勿使用。&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt;&amp;lt;!--{if !isset($wgTimeSinceLastEdit) || !$wgTimeSinceLastEdit}--&amp;gt;&amp;lt;!--{assign var=&amp;quot;wgTimeSinceLastEdit&amp;quot; value=true scope=&amp;quot;global&amp;quot;}--&amp;gt;&amp;lt;script&amp;gt;&lt;br /&gt;
window.RLQ = window.RLQ || [];&lt;br /&gt;
window.RLQ.push(function() {&lt;br /&gt;
    $(function() {&lt;br /&gt;
        mw.loader.using(&amp;quot;moment&amp;quot;).then(function() {&lt;br /&gt;
            // real humanize&lt;br /&gt;
            function humanize(then) {&lt;br /&gt;
                var now = moment();&lt;br /&gt;
                var isBefore = then.isBefore(now);&lt;br /&gt;
                var monthsHave31Days = [0, 2, 4, 6, 7, 9, 11]; // 月份从0开始&lt;br /&gt;
                var year = isBefore ? now.year() - then.year() : then.year() - now.year(),&lt;br /&gt;
                    month = isBefore ? now.month() - then.month() : then.month() - now.month(),&lt;br /&gt;
                    day = isBefore ? now.date() - then.date() : then.date() - now.date(),&lt;br /&gt;
                    hour = isBefore ? now.hour() - then.hour() : then.hour() - now.hour(),&lt;br /&gt;
                    minute = isBefore ? now.minute() - then.minute() : then.minute() - now.minute(),&lt;br /&gt;
                    second = isBefore ? now.second() - then.second() : then.second() - now.second();&lt;br /&gt;
                if (second &amp;lt; 0) {&lt;br /&gt;
                    minute--;&lt;br /&gt;
                    second += 60;&lt;br /&gt;
                }&lt;br /&gt;
                if (minute &amp;lt; 0) {&lt;br /&gt;
                    hour--;&lt;br /&gt;
                    minute += 60;&lt;br /&gt;
                }&lt;br /&gt;
                if (hour &amp;lt; 0) {&lt;br /&gt;
                    day--;&lt;br /&gt;
                    hour += 24;&lt;br /&gt;
                }&lt;br /&gt;
                if (day &amp;lt; 0) {&lt;br /&gt;
                    month--;&lt;br /&gt;
                    if (monthsHave31Days.includes((isBefore ? then : now).month())) {&lt;br /&gt;
                        day += 31;&lt;br /&gt;
                    } else if ((isBefore ? then : now).month() === 1) {&lt;br /&gt;
                        if ((isBefore ? then : now).year() % 4 === 0) {&lt;br /&gt;
                            day += 29;&lt;br /&gt;
                        } else {&lt;br /&gt;
                            day += 28;&lt;br /&gt;
                        }&lt;br /&gt;
                    } else {&lt;br /&gt;
                        day += 30;&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
                if (month &amp;lt; 0) {&lt;br /&gt;
                    year--;&lt;br /&gt;
                    month += 12;&lt;br /&gt;
                }&lt;br /&gt;
                var result = &amp;quot;&amp;quot;;&lt;br /&gt;
                if (year &amp;gt; 0) {&lt;br /&gt;
                    result += year + &amp;quot;年&amp;quot;;&lt;br /&gt;
                }&lt;br /&gt;
                if (month &amp;gt; 0) {&lt;br /&gt;
                    result += month + &amp;quot;个月&amp;quot;;&lt;br /&gt;
                } else if (result !== &amp;quot;&amp;quot;) {&lt;br /&gt;
                    result += &amp;quot;0个月&amp;quot;;&lt;br /&gt;
                }&lt;br /&gt;
                if (day &amp;gt; 0) {&lt;br /&gt;
                    result += day + &amp;quot;天&amp;quot;;&lt;br /&gt;
                } else if (result !== &amp;quot;&amp;quot;) {&lt;br /&gt;
                    result += &amp;quot;0天&amp;quot;;&lt;br /&gt;
                }&lt;br /&gt;
                if (hour &amp;gt; 0) {&lt;br /&gt;
                    result += hour + &amp;quot;小时&amp;quot;;&lt;br /&gt;
                } else if (result !== &amp;quot;&amp;quot;) {&lt;br /&gt;
                    result += &amp;quot;0小时&amp;quot;;&lt;br /&gt;
                }&lt;br /&gt;
                if (minute &amp;gt; 0) {&lt;br /&gt;
                    result += minute + &amp;quot;分&amp;quot;;&lt;br /&gt;
                } else if (result !== &amp;quot;&amp;quot;) {&lt;br /&gt;
                    result += &amp;quot;0分&amp;quot;;&lt;br /&gt;
                }&lt;br /&gt;
                if (second &amp;gt; 0) {&lt;br /&gt;
                    result += second + &amp;quot;秒&amp;quot;;&lt;br /&gt;
                } else if (result !== &amp;quot;&amp;quot;) {&lt;br /&gt;
                    result += &amp;quot;0秒&amp;quot;;&lt;br /&gt;
                }&lt;br /&gt;
                return result + (isBefore ? &amp;quot;前&amp;quot; : &amp;quot;后&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
            /**&lt;br /&gt;
             * Refresh &lt;br /&gt;
             */&lt;br /&gt;
            function tsRefreshDuration() {&lt;br /&gt;
                $(&amp;#039;.lastEditTime&amp;#039;).each(function() {&lt;br /&gt;
                    // Sanity check&lt;br /&gt;
                    if (!this.dataset || !this.dataset.lastEditTime) return;&lt;br /&gt;
                    // FIX BY CASE: In Moegirlpedia&amp;#039;s deployment, the Epoch timestamp is incorrect (with 8 hours&amp;#039; difference)&lt;br /&gt;
                    // We will fix this by subtract 8 hours (28800 seconds)&lt;br /&gt;
                    var lastEditTime = moment.unix(this.dataset.lastEditTime - 28800);&lt;br /&gt;
                    if (!lastEditTime || !lastEditTime.isValid()) return;&lt;br /&gt;
                    // Diff and sanity check&lt;br /&gt;
                    var editTimeDiff = moment.duration(moment().diff(lastEditTime));&lt;br /&gt;
                    if (!editTimeDiff || !editTimeDiff.isValid()) {&lt;br /&gt;
                        // FIX BY CASE (@Yurin Jasmine): Remind user about local time issue&lt;br /&gt;
                        $(this).text(&amp;quot;未知时长（请校准您的设备时间再试）&amp;quot;);&lt;br /&gt;
                        return;&lt;br /&gt;
                    }&lt;br /&gt;
                    // Set time&lt;br /&gt;
                    $(this).text(humanize(lastEditTime) + (editTimeDiff.asMilliseconds() &amp;lt; 0 ? &amp;quot;（请校准您的设备时间再试）&amp;quot; : &amp;quot;&amp;quot;));&lt;br /&gt;
                });&lt;br /&gt;
            }&lt;br /&gt;
            window.setInterval(function() { tsRefreshDuration(); }, 1000);&lt;br /&gt;
            // First call&lt;br /&gt;
            tsRefreshDuration();&lt;br /&gt;
        });&lt;br /&gt;
    });&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/script&amp;gt;&amp;lt;!--{/if}--&amp;gt;&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sheep-realms</name></author>
	</entry>
</feed>