Skip to content

Commit

Permalink
Update ichingshifa.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kentang2017 authored Sep 17, 2024
1 parent eb9276d commit 0173327
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ichingshifa/ichingshifa.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,11 +490,12 @@ def qigua_time(self, y, m, d, h, minute):
zhi_code = dict(zip(self.dizhi, range(1,13)))
yz_code = zhi_code.get(gangzhi[0][1])
hz_code = zhi_code.get(gangzhi[3][1])
min_code = zhi_code.get(gangzhi[4][1])
cm = ld.get("月")
cd = ld.get("日")
eightgua = self.data.get("八卦數值")
lower_gua_remain = (yz_code +cm+cd+hz_code) % 8
upper_gua_remain = (yz_code+cm+cd) % 8
lower_gua_remain = (yz_code +cm+cd+hz_code+min_code) % 8
upper_gua_remain = (yz_code+cm+cd+hz_code) % 8
if upper_gua_remain == 0:
upper_gua_remain = int(8)
upper_gua = eightgua.get(upper_gua_remain)
Expand Down

0 comments on commit 0173327

Please sign in to comment.