<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"><channel><title>MagicLen</title><link>https://magiclen.org/cn/tag/year-helper/</link><description>多元化原创文章，内容包罗万象，有编程语言、网站应用、软件介绍、硬件介绍、操作系统、旅行游记、专题采访、益智问题、文学创作，以及作者们的知识分享和作品分享。</description><language>zh-CN</language><lastBuildDate>Sun, 22 Nov 2026 18:40:18 +0800</lastBuildDate><atom:link href="https://magiclen.org/cn/tag/year-helper/feed/" rel="self" type="application/rss+xml"/><sy:updatePeriod>hourly</sy:updatePeriod><sy:updateFrequency>8</sy:updateFrequency><sy:updateBase>1970-01-01T00:00+00:00</sy:updateBase><item><title>如何写程序判断闰年并计算一个月有几天？</title><link>https://magiclen.org/cn/year-helper/</link><description><![CDATA[<img src="https://magiclen.org/wp-content/uploads/2023/01/calendar-660670_1920-220x162.jpg" srcset="https://magiclen.org/wp-content/uploads/2023/01/calendar-660670_1920-220x162.jpg 1x, https://magiclen.org/wp-content/uploads/2023/01/calendar-660670_1920-440x324.jpg 2x, https://magiclen.org/wp-content/uploads/2023/01/calendar-660670_1920-660x486.jpg 3x" alt>
我们在小学阶段都会学到平年(common year)和闰年(leap year)的判断方式，以及这两种年份是差在前者的二月有 28 天，后者则是有 29 天。所以平年整年一共有 365 天；闰年整年一共有 366 天。这是身为一个地球人的基本常识，但在小学的时候，老师可能只会告诉我们把公元年份的数字除以 4，如果可以整除，那么这年就是闰年，否则是平年。老师说的也不能说是错的，只是不太完整，实际上，...]]></description><category>Go</category><category>Java</category><category>Rust</category><category>JavaScript</category><category>JavaScript</category><category>Rust</category><category>TypeScript</category><category>year-helper</category><guid>https://magiclen.org/cn/year-helper</guid><pubDate>Tue, 3 Jan 2023 12:00:00 +0800</pubDate><dc:creator>Magic Len</dc:creator></item></channel></rss>