SexagenaryCycle
The SexagenaryCycle (干支) class.
Source code in src/ichingpy/model/sexagenary_cycle.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
|
value
property
¶
int: Represents the integer value of the SexagenaryCycle.
__add__(other)
¶
Add an integer or a SexagenaryCycle to the SexagenaryCycle.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other
|
int
|
The integer to add to the SexagenaryCycle. |
required |
Returns:
Name | Type | Description |
---|---|---|
SexagenaryCycle |
SexagenaryCycle
|
The resulting SexagenaryCycle after addition. |
Source code in src/ichingpy/model/sexagenary_cycle.py
60 61 62 63 64 65 66 67 68 69 70 71 |
|
__eq__(other)
¶
Return True if the SexagenaryCycle is equal to the other SexagenaryCycle.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other
|
SexagenaryCycle
|
The other SexagenaryCycle to compare. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if the SexagenaryCycle is equal to the other SexagenaryCycle. |
Source code in src/ichingpy/model/sexagenary_cycle.py
76 77 78 79 80 81 82 83 84 85 |
|
__init__(stem, branch)
¶
Initialize a new instance of the SexagenaryCycle class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
stem
|
HeavenlyStem
|
The HeavenlyStem to use in the SexagenaryCycle. |
required |
branch
|
EarthlyBranch
|
The EarthlyBranch to use in the SexagenaryCycle. |
required |
Source code in src/ichingpy/model/sexagenary_cycle.py
13 14 15 16 17 18 19 20 21 22 23 24 |
|
__int__()
¶
Convert the SexagenaryCycle to an integer.
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
The integer value of the SexagenaryCycle. |
Source code in src/ichingpy/model/sexagenary_cycle.py
52 53 54 55 56 57 58 |
|
__repr__()
¶
Return a string representation of the SexagenaryCycle.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
A string representation of the SexagenaryCycle. |
Source code in src/ichingpy/model/sexagenary_cycle.py
42 43 44 45 46 47 48 49 50 |
|
__sub__(other)
¶
Subtract an integer or a SexagenaryCycle from the SexagenaryCycle.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other
|
int
|
The integer to subtract from the SexagenaryCycle. |
required |
Returns:
Name | Type | Description |
---|---|---|
SexagenaryCycle |
SexagenaryCycle
|
The resulting SexagenaryCycle after subtraction. |
Source code in src/ichingpy/model/sexagenary_cycle.py
87 88 89 90 91 92 93 94 95 96 97 98 |
|
from_int(value)
classmethod
¶
Create a new instance of the SexagenaryCycle from an integer.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value
|
int
|
The integer value |
required |
Source code in src/ichingpy/model/sexagenary_cycle.py
31 32 33 34 35 36 37 38 39 40 |
|
set_language(language)
classmethod
¶
Set the display language of the SexagenaryCycle.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
language
|
Language
|
The display language to set. |
required |
Source code in src/ichingpy/model/sexagenary_cycle.py
103 104 105 106 107 108 109 110 |
|