获取身宫 @return 身宫
()
| 525 | * @return 身宫 |
| 526 | */ |
| 527 | public String getShenGong() { |
| 528 | int monthZhiIndex = LunarUtil.find(getMonthZhi(), MONTH_ZHI, 0); |
| 529 | int timeZhiIndex = LunarUtil.find(getTimeZhi(), LunarUtil.ZHI, 0); |
| 530 | int offset = monthZhiIndex + timeZhiIndex; |
| 531 | if (offset > 12) { |
| 532 | offset -= 12; |
| 533 | } |
| 534 | int ganIndex = (lunar.getYearGanIndexExact() + 1) * 2 + offset; |
| 535 | while (ganIndex > 10) { |
| 536 | ganIndex -= 10; |
| 537 | } |
| 538 | return LunarUtil.GAN[ganIndex] + MONTH_ZHI[offset]; |
| 539 | } |
| 540 | |
| 541 | /** |
| 542 | * 获取身宫纳音 |