Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.4.1]: Wrong results using the parameter yearDivide to 'normal' #190

Closed
ameurenand opened this issue Apr 30, 2024 · 2 comments · Fixed by #191
Closed

[2.4.1]: Wrong results using the parameter yearDivide to 'normal' #190

ameurenand opened this issue Apr 30, 2024 · 2 comments · Fixed by #191
Assignees
Labels
漏洞|bug Something isn't working

Comments

@ameurenand
Copy link

ameurenand commented Apr 30, 2024

描述(Description)

With version 2.2.1, everything is correct.
But with version 2.4.1, I have some wrong results using the configuration parameter yearDivide to 'normal'.

Example of incorrect palace's decade range :

  • Using iztro version 2.2.1 (expected result):
const astrolabe = astro.bySolar('1980-2-14', 0, 'male', true, 'en-US');
console.log(astrolabe.palaces[0].decadal.range);     // [112, 121]
  • Using iztro version 2.4.1 (wrong result):
astro.config({yearDivide: 'normal'});
const astrolabe = astro.bySolar('1980-2-14', 0, 'male', true, 'en-US');
console.log(astrolabe.palaces[0].decadal.range);     // [12, 21]

Example of incorrect earthly branch of the year :

  • Using iztro version 2.2.1 (expected result):
const astrolabe = astro.bySolar('1980-2-14', 0, 'male', true, 'en-US');
const horoscope = astrolabe.horoscope('1980-2-14');
console.log(horoscope.yearly.earthlyBranch);     // wei
  • Using iztro version 2.4.1 (wrong result):
astro.config({yearDivide: 'normal'});
const astrolabe = astro.bySolar('1980-2-14', 0, 'male', true, 'en-US');
const horoscope = astrolabe.horoscope('1980-2-14');
console.log(horoscope.yearly.earthlyBranch);     // shen
@SylarLong
Copy link
Owner

Hello @ameurenand , Please upgrade the version to v2.4.3 and use global configuration horoscopeDivide: 'normal' to fix the issue. Thank you for your reporting.

Happy coding~

@ameurenand
Copy link
Author

It works as expected.
Thank you for this quick hotfix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
漏洞|bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants