Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

日的地支有错误 #47

Open
loveapple opened this issue Dec 8, 2024 · 7 comments
Open

日的地支有错误 #47

loveapple opened this issue Dec 8, 2024 · 7 comments

Comments

@loveapple
Copy link

loveapple commented Dec 8, 2024

例如,1980/3/23
日的地支:“申”,
但是处理结果:“未”

所以,相应的时辰的天干也是错误的

@6tail
Copy link
Owner

6tail commented Dec 8, 2024

你认为是那就是吧。

@loveapple
Copy link
Author

感觉时辰的计算也有问题
代码:
` SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH");
log.debug(format.format(this.solarCalendar.getTime()));

	HealthWuxing result = new HealthWuxing();

	WuXing yGan = Gan.findByStr(lunar.getYearGanExact()).getWuxing();
	WuXing yZhi = Zhi.findByStr(lunar.getYearZhiExact()).getWuxing();
	result.addWuxing(yGan);
	result.addWuxing(yZhi);
	if (yGan == yZhi) {
		result.addGanZhiWuxing(yGan);
	}
	log.debug("process: {}({}) -> {}({})", yGan, lunar.getYearGanExact(), yZhi, lunar.getYearZhiExact());

	WuXing mGan = Gan.findByStr(lunar.getMonthGanExact()).getWuxing();
	WuXing mZhi = Zhi.findByStr(lunar.getMonthZhiExact()).getWuxing();
	result.addWuxing(mGan);
	result.addWuxing(mZhi);
	if (mGan == mZhi) {
		result.addGanZhiWuxing(mGan);
	}
	log.debug("process: {}({}) -> {}({})", mGan, lunar.getMonthGanExact(), mZhi, lunar.getMonthZhiExact());

	WuXing dGan = Gan.findByStr(lunar.getDayGanExact2()).getWuxing();
	WuXing dZhi = Zhi.findByStr(lunar.getDayZhiExact2()).getWuxing();
	result.addWuxing(dGan);
	result.addWuxing(dZhi);
	if (dGan == dZhi) {
		result.addGanZhiWuxing(dGan);
	}
	log.debug("process: {}({}{}) -> {}({}{})", dGan, lunar.getDayGanExact2(), lunar.getDayGan(), dZhi,
			lunar.getDayZhiExact2(), lunar.getDayZhi());

	WuXing tGan = Gan.findByStr(lunar.getTimeGan()).getWuxing();
	WuXing tZhi = Zhi.findByStr(lunar.getTimeZhi()).getWuxing();
	result.addWuxing(tGan);
	result.addWuxing(tZhi);
	if (tGan == tZhi) {
		result.addGanZhiWuxing(tGan);
	}
	log.debug("process: {}({}) -> {}({}) hour:{}", tGan, lunar.getTimeGan(), tZhi, lunar.getTimeZhi(),
			lunar.getHour());`

输出结果:
`19:49:46.788 [main] DEBUG com.happinesea.zhongyitools.SiZhuBaZi - 1980-03-23 23
19:49:46.797 [main] DEBUG com.happinesea.zhongyitools.SiZhuBaZi - process: JIN(庚) -> JIN(申)
19:49:46.800 [main] DEBUG com.happinesea.zhongyitools.SiZhuBaZi - process: TU(己) -> MU(卯)
19:49:46.800 [main] DEBUG com.happinesea.zhongyitools.SiZhuBaZi - process: MU(乙乙) -> TU(未未)
19:49:46.800 [main] DEBUG com.happinesea.zhongyitools.SiZhuBaZi - process: HUO(丁) -> SHUI(亥) hour:22

`
タイトルなし

@loveapple
Copy link
Author

你认为是那就是吧。

这个bug不会修改是吗?

@6tail
Copy link
Owner

6tail commented Dec 8, 2024

1980/3/23日支本来就是未啊,哪有什么bug?

@loveapple
Copy link
Author

1980/3/23日支本来就是未啊,哪有什么bug?

请问你的参考数据能给一下吗?
我找到的工具日支都是申

@6tail
Copy link
Owner

6tail commented Dec 8, 2024

QQ_1733656765034

你在任何一个稍微靠谱一点点的地方查,都是未哈。

@loveapple
Copy link
Author

谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants