# time.ganzhi 库模块帮助文档

## time 成员列表 <a id="time" href="#time">&#x23;</a>

### time.ganzhi() <a id="time.ganzhi" href="#time.ganzhi">&#x23;</a>
[返回对象:TimeGanzhiObject](#TimeGanzhiObject)

### time.ganzhi(dateTime,useLichun) <a id="time.ganzhi" href="#time.ganzhi">&#x23;</a>
创建干支对象  
- dateTime: 日期，可指定 time 对象，time.lunar 对象，  
或者包含公历日期时间的字符串（可自右向左省略秒、分、时部分）。  
- useLichun: true以立春为年界(默认,八字), false以正月初一为界  

[返回对象:TimeGanzhiObject](#TimeGanzhiObject)

## time.ganzhi 成员列表 <a id="time.ganzhi" href="#time.ganzhi">&#x23;</a>

干支计算库  
支持八字四柱干支计算

### time.ganzhi.getDay(date) <a id="time.ganzhi.getDay" href="#time.ganzhi.getDay">&#x23;</a>
获取日干支

### time.ganzhi.getHour(date) <a id="time.ganzhi.getHour" href="#time.ganzhi.getHour">&#x23;</a>
获取时辰干支

### time.ganzhi.getMonth(date) <a id="time.ganzhi.getMonth" href="#time.ganzhi.getMonth">&#x23;</a>
获取月干支（以节气为界）

### time.ganzhi.getShiName(hour) <a id="time.ganzhi.getShiName" href="#time.ganzhi.getShiName">&#x23;</a>
获取时辰名称

### time.ganzhi.getYear(date,useLichun) <a id="time.ganzhi.getYear" href="#time.ganzhi.getYear">&#x23;</a>
获取年干支

### time.ganzhi.getZodiac(date,useLichun) <a id="time.ganzhi.getZodiac" href="#time.ganzhi.getZodiac">&#x23;</a>
获取生肖

## TimeGanzhiObject 成员列表 <a id="TimeGanzhiObject" href="#TimeGanzhiObject">&#x23;</a>

### TimeGanzhiObject.bazi <a id="TimeGanzhiObject.bazi" href="#TimeGanzhiObject.bazi">&#x23;</a>
八字

### TimeGanzhiObject.datetime <a id="TimeGanzhiObject.datetime" href="#TimeGanzhiObject.datetime">&#x23;</a>
原始时间

### TimeGanzhiObject.day <a id="TimeGanzhiObject.day" href="#TimeGanzhiObject.day">&#x23;</a>
日柱  

[返回对象:TimeGanzhiPillarObject](#TimeGanzhiPillarObject)

### TimeGanzhiObject.hour <a id="TimeGanzhiObject.hour" href="#TimeGanzhiObject.hour">&#x23;</a>
时柱  

[返回对象:TimeGanzhiPillarObject](#TimeGanzhiPillarObject)

### TimeGanzhiObject.lunar <a id="TimeGanzhiObject.lunar" href="#TimeGanzhiObject.lunar">&#x23;</a>
农历对象  

[返回对象:TimeLunarObject](#TimeLunarObject)

### TimeGanzhiObject.month <a id="TimeGanzhiObject.month" href="#TimeGanzhiObject.month">&#x23;</a>
月柱  

[返回对象:TimeGanzhiPillarObject](#TimeGanzhiPillarObject)

### TimeGanzhiObject.year <a id="TimeGanzhiObject.year" href="#TimeGanzhiObject.year">&#x23;</a>
年柱  

[返回对象:TimeGanzhiPillarObject](#TimeGanzhiPillarObject)

### TimeGanzhiObject.zodiac <a id="TimeGanzhiObject.zodiac" href="#TimeGanzhiObject.zodiac">&#x23;</a>
生肖

## TimeGanzhiPillarObject 成员列表 <a id="TimeGanzhiPillarObject" href="#TimeGanzhiPillarObject">&#x23;</a>

### TimeGanzhiPillarObject.gan <a id="TimeGanzhiPillarObject.gan" href="#TimeGanzhiPillarObject.gan">&#x23;</a>
天干

### TimeGanzhiPillarObject.ganIndex <a id="TimeGanzhiPillarObject.ganIndex" href="#TimeGanzhiPillarObject.ganIndex">&#x23;</a>
天干索引(0-9)

### TimeGanzhiPillarObject.name <a id="TimeGanzhiPillarObject.name" href="#TimeGanzhiPillarObject.name">&#x23;</a>
干支名称

### TimeGanzhiPillarObject.zhi <a id="TimeGanzhiPillarObject.zhi" href="#TimeGanzhiPillarObject.zhi">&#x23;</a>
地支

### TimeGanzhiPillarObject.zhiIndex <a id="TimeGanzhiPillarObject.zhiIndex" href="#TimeGanzhiPillarObject.zhiIndex">&#x23;</a>
地支索引(0-11)
