LLWiki正在建设中,欢迎加入我们

“Widget:Countdown”的版本间差异

跳转到导航 跳转到搜索
删除157字节 、​ 2020年9月30日 (三) 22:27
无编辑摘要
标签移动版网页编辑 移动版编辑
before = ele.children[0],
after = ele.children[1],
i18n = } else {ele.title,
isBefore = then.isBefore(now),
monthsHave31Days = [0, 2, 4, 6, 7, 9, 11], // 月份从0开始
if (day < 0) {
month--;
if (monthsHave31Days.includes((isBefore ? then : now).month())) { day += 31; }
else if ((isBefore ? daythen : now).month() +=== 1) 31;{
} else if ((isBefore ? then : now).monthyear() % 4 === 10) { day += 29; }
ifelse ((isBefore{ ? then : now).year() % 4day ==+= 0)28; {}
day += 29;
} else {
day += 28;
}
} else {
day += 30;
}
else { day += 2930; }
}
if (month < 0) {
month += 12;
}
if (year > 0) { result += `<span class="countdown-num">${year}</` + 'span>年'; }
if (month > 0) { result += `<span class="countdown-num">${yearmonth}</` + 'span>' + i18n.substring(2); }
else if (result !== "") { result += `<span class="countdown-num">${0}</` + 'span>' + elei18n.dataset.hoursubstring(2); }
}
if (monthday > 0) { result += `<span class="countdown-num">${day}</` + 'span>天'; }
else if (result !== "") { result += `<span class="countdown-num">${month0}</` + 'span>'; + ele.dataset.month;}
} else if (result !== "") {
result += `<span class="countdown-num">${0}</` + 'span>' + ele.dataset.month;
}
if (day > 0) {
result += `<span class="countdown-num">${day}</` + 'span>天';
} else if (result !== "") {
result += `<span class="countdown-num">${0}</` + 'span>天';
}
if(year == 0 && month == 0) {
if (hour > 0) { result += `<span class="countdown-num">${hour}</` + 'span>' + i18n.substring(0, 2); }
else if (result !== "") { result += `<span class="countdown-num">${hour0}</` + 'span>' + elei18n.dataset.hoursubstring(0, 2); }
} else if (result !== "") {
result += `<span class="countdown-num">${0}</` + 'span>' + ele.dataset.hour;
}
if(day == 0) {
if (minute > 0) { result += `<span class="countdown-num">${minute}</` + 'span>分'; }
else if (result !== "") { result += `<span class="countdown-num">${minute0}</` + 'span>分'; }
} else if (second > 0) { result !=+= `<span class="countdown-num") >${second}</` + 'span>秒'; }
else if (result !== "") { result += `<span class="countdown-num">${0}</` + 'span>'; }
}
if (second > 0) {
result += `<span class="countdown-num">${second}</` + 'span>秒';
} else if (result !== "") {
result += `<span class="countdown-num">${0}</` + 'span>秒';
}
}
}
<includeonly>
</script>
<style>
<!--{/if}--></includeonly>
/* </includeonly>CSS样式表:<pre lang="css"> */
.countdownNode {
visibility:hidden;
}
/* </pre><includeonly> */
</style><!--{/if}--></includeonly>
16,874

个编辑

导航菜单