Skip to main content

celestial stem and terrestrial branch

Project description

天干地支干支

天干

天干(celestial stem)是中国古代的一种文字计序符号,共10个字:甲、乙、丙、丁、戊、己、庚、辛、壬、癸,循环使用。

地支

地支(terrestrial branch)是中国古代的一种文字计序符号,共12个字∶子、丑、寅、卯、辰、巳、午、未、申、酉、戌、亥,循环使用。

干支

六十干支周(sexagesimal cycle)是中国古代把天干和地支各循序取一字相配成一对干支,形成一种新的较长的计序符号系统,如:甲子、乙丑、丙寅……等,共可配成60对干支,然后周而复始,故称六十干支周。

十天干十二地支六十干支

天干 地支 索引 干支 阳历
1 甲子 1984
2 乙丑 1985
3 丙寅 1986
4 丁卯 1987
5 戊辰 1988
6 己巳 1989
7 庚午 1990
8 辛未 1991
9 壬申 1992
10 癸酉 1993
11 甲戌 1994
12 乙亥 1995
13 丙子 1996
14 丁丑 1997
15 戊寅 1998
16 己卯 1999
17 庚辰 2000
18 辛巳 2001
19 壬午 2002
20 癸未 2003
21 甲申 2004
22 乙酉 2005
23 丙戌 2006
24 丁亥 2007
25 戊子 2008
26 己丑 2009
27 庚寅 2010
28 辛卯 2011
29 壬辰 2012
30 癸巳 2013
31 甲午 2014
32 乙未 2015
33 丙申 2016
34 丁酉 2017
35 戊戌 2018
36 己亥 2019
37 庚子 2020
38 辛丑 2021
39 壬寅 2022
40 癸卯 2023
41 甲辰 2024
42 乙巳 2025
43 丙午 2026
44 丁未 2027
45 戊申 2028
46 己酉 2029
47 庚戌 2030
48 辛亥 2031
49 壬子 2032
50 癸丑 2033
51 甲寅 2034
52 乙卯 2035
53 丙辰 2036
54 丁巳 2037
55 戊午 2038
56 己未 2039
57 庚申 2040
58 辛酉 2041
59 壬戌 2042
60 癸亥 2043

常量

# for loop
from stembranch import stem, branch

for i, j in zip(stem * 6, branch * 5):
    print(i + j)
from stembranch import stem, branch

print(list(i + j for i, j in zip(stem * 6, branch * 5)))
print(tuple(i + j for i, j in zip(stem * 6, branch * 5)))
print([i + j for i, j in zip(stem * 6, branch * 5)])
print(*(i + j for i, j in zip(stem * 6, branch * 5)))
from stembranch import stem, branch

print(tuple(map(lambda i, j: i + j, stem * 6, branch * 5)))
print(list(map(lambda i, j: i + j, stem * 6, branch * 5)))
print(*map(lambda i, j: i + j, stem * 6, branch * 5))
print([*map(lambda i, j: i + j, stem * 6, branch * 5)])
from stembranch import stem, branch

for i in range(60):
    print(stem[i % 10] + branch[i % 12])
from stembranch import stem, branch

print(*(stem[i % 10] + branch[i % 12] for i in range(60)))
print([stem[i % 10] + branch[i % 12] for i in range(60)])
print(list(stem[i % 10] + branch[i % 12] for i in range(60)))
print(tuple(stem[i % 10] + branch[i % 12] for i in range(60)))

函数

from stembranch import stembranch

print(stembranch(2022))

from stembranch import StemBranch

stembranch = StemBranch()
print(stembranch.stem)
print(stembranch.branch)
print(stembranch.stembranch(2022))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stembranch-1.0.2.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

stembranch-1.0.2-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file stembranch-1.0.2.tar.gz.

File metadata

  • Download URL: stembranch-1.0.2.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.7

File hashes

Hashes for stembranch-1.0.2.tar.gz
Algorithm Hash digest
SHA256 c1de0a89b4d0869c8230c63616ebb90f85d07405cc1fa1f64f013fb37367b525
MD5 99840208f0d24e968cfe59f23c4c9239
BLAKE2b-256 48313d6d3165507a158057f7e5de127aa6933b42fb0aed7c8a53ed3677287e03

See more details on using hashes here.

File details

Details for the file stembranch-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: stembranch-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.7

File hashes

Hashes for stembranch-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6bdff627dc6f004cf95f2250637c12fd9c739d42ac2b85a90a474b802d759070
MD5 557048c364c9249a32269700a97b7f38
BLAKE2b-256 ba5514e20ce89310f51f1dfa92baf63bb30aba05479616f88b51ad42529a8038

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page