@drewsonne/maya-dates / Exports / Tzolkin
Describes a fullDate in the 260-day cycle with a position and a day
Example
let day = new Tzolkin(4, "Ajaw");
Example
let day = new Tzolkin(4, new TzolkinDay("Ajaw"));
↳ Tzolkin
• new Tzolkin(newCoeff, newDay)
Constructor
| Name | Type | Description |
|---|---|---|
newCoeff |
ICoefficient |
The position in the 260-day cycle |
newDay |
Wildcard | TzolkinDay |
• coeff: ICoefficient
• comment: Comment
Attached comment.
• day: Wildcard | TzolkinDay
• Private nextHolder: null | Tzolkin
• get name(): string | Wildcard
Return a string representation of the 260-day cycle name
string | Wildcard
▸ appendComment(comment): any
Append additional text to the current comment.
| Name | Type |
|---|---|
comment |
string | Comment |
any
▸ commentIsEqual(otherCommentWrapper): boolean
Compare this wrapper’s comment against another wrapper.
| Name | Type |
|---|---|
otherCommentWrapper |
CommentWrapper |
boolean
▸ equal(other): boolean
Ensure this Tzolkin object has the same configuration as another Tzolkin object. Does not take wildcards into account.
| Name | Type |
|---|---|
other |
IPart |
boolean
▸ equalWithComment(otherCommentWrapper): boolean
Check equality including the associated comment.
| Name | Type |
|---|---|
otherCommentWrapper |
IPart |
boolean
CommentWrapper.equalWithComment
▸ match(newTzolkin): boolean
Ensure this Tzolkin object has a matching configuration as another Tzolkin object. Takes wildcards into account.
| Name | Type |
|---|---|
newTzolkin |
Tzolkin |
boolean
▸ next(): Tzolkin
Return the next day in the 260-day cycle
▸ nextCalculator(): Tzolkin
▸ setComment(comment): any
Replace the current comment.
| Name | Type |
|---|---|
comment |
string | Comment |
any
▸ shift(newIncremental): Tzolkin
| Name | Type |
|---|---|
newIncremental |
number |
▸ toString(): string
Render the 260-day cycle fullDate as a string
string
▸ validate(): boolean
Ensure the Tzolkin’s coefficients are within range and the day is defined
boolean