<?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/ba-zi/</link><description>多元化原创文章，内容包罗万象，有编程语言、网站应用、软件介绍、硬件介绍、操作系统、旅行游记、专题采访、益智问题、文学创作，以及作者们的知识分享和作品分享。</description><language>zh-CN</language><lastBuildDate>Sun, 22 Nov 2026 18:26:29 +0800</lastBuildDate><atom:link href="https://magiclen.org/cn/tag/ba-zi/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>如何在 Rust 编程语言中实现西历和农历的转换？如何计算八字重量？</title><link>https://magiclen.org/cn/chinese-lunisolar-calendar/</link><description><![CDATA[<img src="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png 1x, https://magiclen.org/wp-content/uploads/2018/04/rust-440x324.png 2x, https://magiclen.org/wp-content/uploads/2018/04/rust-660x486.png 3x" alt>
中国的农历同时考虑到月球绕行地球与地球绕行太阳的情形，不像西历那样有着明显的规律，虽然农历本身的干支年是 60 年循环一次，但是每个年份在每次循环中，所含的各个月份之天数有可能是不一样的，甚至连该年有没有闰月，有闰月的话是闰几月也都不能固定，单讲哪个干支年也无法确定究竟是第几次循环的，因此通常还会搭配其它历法或是纪年法来使用，现在的话当然就是搭配西历来用啦！]]></description><category>Rust</category><category>生辰八字</category><category>农历</category><category>Rust</category><category>chinese-lunisolar-calendar</category><guid>https://magiclen.org/cn/chinese-lunisolar-calendar</guid><pubDate>Mon, 28 Jan 2019 20:00:58 +0800</pubDate><dc:creator>Magic Len</dc:creator></item><item><title>JavaChineseCalendar─能让 Java 支持农历历法的 Java 函数库</title><link>https://magiclen.org/cn/java-chinese-calendar/</link><description><![CDATA[<img src="https://magiclen.org/wp-content/uploads/2023/09/shot-02-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2023/09/shot-02-220x162.png 1x, https://magiclen.org/wp-content/uploads/2023/09/shot-02-440x324.png 2x, https://magiclen.org/wp-content/uploads/2023/09/shot-02-660x486.png 3x" alt>
虽然 Java 8 之后的日期函数库能够支持多种历法，但是中国的农历还是尚未被纳入支持范围。如果要在 Java 使用农历历法，可以使用「JavaChineseCalendar」这个 Java 函数库。JavaChineseCalendar 支持农历和西历日期的转换，时间可从西历的公元 1901 年 2 月 19 日支持到 2100 年 12 月 31 日。另外，它还能计算生辰八字的重量。]]></description><category>作品分享</category><category>软件介绍</category><category>Java</category><category>Java</category><category>JavaChineseCalendar</category><category>生辰八字</category><category>农历</category><guid>https://magiclen.org/cn/java-chinese-calendar</guid><pubDate>Tue, 15 Oct 2013 20:14:59 +0800</pubDate><dc:creator>Magic Len</dc:creator></item></channel></rss>