Skip to content

Latest commit

 

History

History
158 lines (118 loc) · 6.28 KB

docs.md

File metadata and controls

158 lines (118 loc) · 6.28 KB

Classes

BaziConverter

Functions

getEarthNumberFromHour(hour)

getEarthNumberFromHour To get the Earth Number (or DiziNumber) based on the hour provided. A "-"" will be returned if the hour value is not recognized.

convertToTianGangNumber(HNumber)String

convertToTianGangNumber To indicate the number to be related to heavenly stem

convertToDiziNumber(ENumber)String

convertToDiziNumber To indicate the number to be related to earthly branch

getBaziJson()JSON

getBaziJson To compute bazi result from provided parameters

getBaziChineseFullString()String

getBaziChineseFullString Format the bazi result in full, used for interpretation

getBaziEnglishMapping(baziChinese)JSON

getBaziEnglishMapping Each pillar consist of 2 characters for the bazi in the format of heavenly stem + earthly stem

translateBaziEnglish()JSON

translateBaziEnglish Translate the bazi results from Chinese to English

getBaziEnglishMapping(baziChinese)JSON

getBaziEnglishMapping Each pillar consist of 2 characters for the bazi in the format of heavenly stem + earthly stem

getElementalZodiacMappingChinese(baziEnglish)String

getElementalZodiacMappingChinese To get the element and zodiac that are commonly used

getBaziJsonWithElementalZodiac()JSON

getBaziJsonWithElementalZodiac To compute bazi result with commonly used terms i.e. element and zodiac (or animal mnemonic)

BaziConverter

Kind: global class

new BaziConverter(year, month, day, hour)

Param Type Description
year integer year of the date when the indivudal is born
month integer month of the date when the indivudal is born
day integer day of the date when the indivudal is born
hour integer hour of the individual is born

getEarthNumberFromHour(hour)

getEarthNumberFromHour To get the Earth Number (or DiziNumber) based on the hour provided. A "-"" will be returned if the hour value is not recognized.

Kind: global function

Param Type Description
hour integer hour of the individual is born

convertToTianGangNumber(HNumber) ⇒ String

convertToTianGangNumber To indicate the number to be related to heavenly stem

Kind: global function
Returns: String - Returns TianGangNumber (or heavenly stem number)

Param Type
HNumber integer

convertToDiziNumber(ENumber) ⇒ String

convertToDiziNumber To indicate the number to be related to earthly branch

Kind: global function
Returns: String - Returns DiziNumber (or earthly branch number)

Param Type
ENumber integer

getBaziJson() ⇒ JSON

getBaziJson To compute bazi result from provided parameters

Kind: global function
Returns: JSON - Returns bazi result related to the 4 pillars

getBaziChineseFullString() ⇒ String

getBaziChineseFullString Format the bazi result in full, used for interpretation

Kind: global function
Returns: String - Returns Bazi in full

getBaziEnglishMapping(baziChinese) ⇒ JSON

getBaziEnglishMapping Each pillar consist of 2 characters for the bazi in the format of heavenly stem + earthly stem

Kind: global function
Returns: JSON - Returns the associated animal mnemonic, element and organ

Param Description
baziChinese A valid bazi (2 Chinese characters) from any of the 4 pillars

translateBaziEnglish() ⇒ JSON

translateBaziEnglish Translate the bazi results from Chinese to English

Kind: global function
Returns: JSON - Returns bazi result related to the 4 pillars in English

getBaziEnglishMapping(baziChinese) ⇒ JSON

getBaziEnglishMapping Each pillar consist of 2 characters for the bazi in the format of heavenly stem + earthly stem

Kind: global function
Returns: JSON - Returns the associated animal mnemonic and element in English

Param Type Description
baziChinese String A valid bazi (2 Chinese characters) from any of the 4 pillars

getElementalZodiacMappingChinese(baziEnglish) ⇒ String

getElementalZodiacMappingChinese To get the element and zodiac that are commonly used

Kind: global function
Returns: String - Returns the associated animal mnemonic (or zodiac)and element in Chinese

Param Type Description
baziEnglish String A valid bazi in English (Element + Animal Mnemonic) from any of the 4 pillars

getBaziJsonWithElementalZodiac() ⇒ JSON

getBaziJsonWithElementalZodiac To compute bazi result with commonly used terms i.e. element and zodiac (or animal mnemonic)

Kind: global function
Returns: JSON - Return the Bazi result with commonly used terms in Chinese