Open TianYi0217 opened 1 week ago
import lunisolar from 'lunisolar'; 输入:
const time011022 = lunisolar('2024/01/10 22:00:00') const time011023 = lunisolar('2024/01/10 23:00:00') const time011024 = lunisolar('2024/01/10 24:00:00') console.log(`2024/01/10 22:00:00 = ${time011022}`); console.log(`2024/01/10 23:00:00 = ${time011023}`); console.log(`2024/01/10 24:00:00 = ${time011024}`); const time020922 = lunisolar('2024/02/09 22:00:00') const time020923 = lunisolar('2024/02/09 23:00:00') const time020924 = lunisolar('2024/02/09 24:00:00') console.log(`2024/02/09 22:00:00 = ${time020922}`); console.log(`2024/02/09 23:00:00 = ${time020923}`); console.log(`2024/02/09 24:00:00 = ${time020924}`);
终端输出:
2024/01/10 22:00:00 = Wed, 10 Jan 2024 14:00:00 GMT (二〇二三年十一月廿九亥時) utcOffset: 480
2024/01/10 23:00:00 = Wed, 10 Jan 2024 15:00:00 GMT (二〇二三年十一月廿九子時) utcOffset: 480
2024/01/10 24:00:00 = Wed, 10 Jan 2024 16:00:00 GMT (二〇二三年十二月初一子時) utcOffset: 480
2024/02/09 22:00:00 = Fri, 09 Feb 2024 14:00:00 GMT (二〇二三年十二月三十亥時) utcOffset: 480
2024/02/09 23:00:00 = Fri, 09 Feb 2024 15:00:00 GMT (二〇二四年正月初一子時) utcOffset: 480
2024/02/09 24:00:00 = Fri, 09 Feb 2024 16:00:00 GMT (二〇二四年正月初一子時) utcOffset: 480
此处的日期2024/01/10 23:00:00应为十二月初一子時
diffDate1902to2098.json
经过遍历, 查询到不同的时间存在了附件中. 推测是 阳历换年后-农历换年前 这段时间的问题.
十分感谢反馈,已经修复并更新版本到v2.5.1。 谢谢。
import lunisolar from 'lunisolar'; 输入:
终端输出:
2024/01/10 22:00:00 = Wed, 10 Jan 2024 14:00:00 GMT (二〇二三年十一月廿九亥時) utcOffset: 480
2024/01/10 23:00:00 = Wed, 10 Jan 2024 15:00:00 GMT (二〇二三年十一月廿九子時) utcOffset: 480
2024/01/10 24:00:00 = Wed, 10 Jan 2024 16:00:00 GMT (二〇二三年十二月初一子時) utcOffset: 480
2024/02/09 22:00:00 = Fri, 09 Feb 2024 14:00:00 GMT (二〇二三年十二月三十亥時) utcOffset: 480
2024/02/09 23:00:00 = Fri, 09 Feb 2024 15:00:00 GMT (二〇二四年正月初一子時) utcOffset: 480
2024/02/09 24:00:00 = Fri, 09 Feb 2024 16:00:00 GMT (二〇二四年正月初一子時) utcOffset: 480
此处的日期2024/01/10 23:00:00应为十二月初一子時
diffDate1902to2098.json
经过遍历, 查询到不同的时间存在了附件中. 推测是 阳历换年后-农历换年前 这段时间的问题.