We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
FUNCTION calculateFourPillars(year, month, day, hour): # Define Heavenly Stems and Earthly Branches Heavenly_Stems = ["Jia", "Yi", "Bing", "Ding", "Wu", "Ji", "Geng", "Xin", "Ren", "Gui"] Earthly_Branches = ["Zi", "Chou", "Yin", "Mao", "Chen", "Si", "Wu", "Wei", "Shen", "You", "Xu", "Hai"] # Calculate the Stem and Branch for the Year year_stem_index = (year - 4) % 10 year_branch_index = (year - 4) % 12 year_stem = Heavenly_Stems[year_stem_index] year_branch = Earthly_Branches[year_branch_index] # Calculate the Stem and Branch for the Month month_stem_index = (year_stem_index * 2 + month - 1) % 10 month_branch_index = (year_branch_index * 2 + month - 1) % 12 month_stem = Heavenly_Stems[month_stem_index] month_branch = Earthly_Branches[month_branch_index] # Calculate the Stem and Branch for the Day day_stem_index = (year_stem_index + month_stem_index + day - 1) % 10 day_branch_index = (year_branch_index + month_branch_ind ```
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: