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

常量

from stembranch import stem, branch

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

print(tuple(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 stembranch

print(stembranch(2025))

from stembranch import Date

today = Date.today()
print(today.stem)
print(today.branch)
print(today.stembranch())

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.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stembranch-1.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stembranch-1.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for stembranch-1.1.tar.gz
Algorithm Hash digest
SHA256 e28cec69caad686d789e9888eb5519ca3f0f81a38f1c155214838d4763eaeeaa
MD5 a5d30ce5c2f869f8efb33677805054e7
BLAKE2b-256 35f71914b75d6e058cb82fbd9318acbef0c1c8054b951bdea572652b6757087d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: stembranch-1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for stembranch-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d05145ff2e6b78cfecbb1e386e52e4ab56c50c6f7145ec36437866f51ab3d2ac
MD5 656e00a06c141ab316832cf7f5fbd7b7
BLAKE2b-256 c1c67f010388149efa9500e530da267530dd4c827cef0fffb38c02f9214fb636

See more details on using hashes here.

Supported by

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