1
0
mirror of synced 2026-04-15 21:08:40 +08:00

v1.0.16 增加获取完整地支十神的方法。

This commit is contained in:
6tail
2020-07-27 20:37:31 +08:00
parent 2c176dafc7
commit 40e38ded58
2 changed files with 27 additions and 1 deletions

View File

@@ -1123,6 +1123,32 @@
}
return l;
},
_getBaZiShiShenZhi:function(zhi){
var baZi = this.getBaZi();
var dayGan = baZi[2].substr(0,1);
var hideGan = LunarUtil.ZHI_HIDE_GAN[zhi];
var l = [];
for(var i=0,j=hideGan.length;i<j;i++){
l.push(LunarUtil.SHI_SHEN_ZHI[dayGan+zhi+hideGan[i]]);
}
return l;
},
getBaZiShiShenYearZhi:function(){
var baZi = this.getBaZi();
return this._getBaZiShiShenZhi(baZi[0].substr(1));
},
getBaZiShiShenMonthZhi:function(){
var baZi = this.getBaZi();
return this._getBaZiShiShenZhi(baZi[1].substr(1));
},
getBaZiShiShenDayZhi:function(){
var baZi = this.getBaZi();
return this._getBaZiShiShenZhi(baZi[2].substr(1));
},
getBaZiShiShenTimeZhi:function(){
var baZi = this.getBaZi();
return this._getBaZiShiShenZhi(baZi[3].substr(1));
},
getZhiXing:function(){
var offset = this._p.dayZhiIndex-this._p.monthZhiIndex;
if(offset<0){

View File

@@ -1,6 +1,6 @@
{
"name": "lunar-javascript",
"version": "1.0.15",
"version": "1.0.16",
"description": "lunar is a calendar library for Solar and Chinese Lunar.",
"main": "index.js",
"scripts": {