@drewsonne/maya-dates / Exports / Haab
Describes a Haab fullDate with a position and a month
Example
let day = new Haab(8, "Kumk'u");
Example
let day = new Haab(8, new HaabMonth("Kumk'u"));
↳ Haab
• new Haab(coeff
, month
)
Constructor
Name | Type | Description |
---|---|---|
coeff |
ICoefficient |
The position in the Haab month for this date |
month |
Wildcard | HaabMonth |
• coeff: ICoefficient
• comment: Comment
Attached comment.
• Private
nextHolder: null
| Haab
• get
name(): string
Return a string representation of the Haab month name
string
▸ 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
Compare this object with another for equality.
Name | Type |
---|---|
other |
IPart |
boolean
▸ equalWithComment(otherCommentWrapper
): boolean
Check equality including the associated comment.
Name | Type |
---|---|
otherCommentWrapper |
IPart |
boolean
CommentWrapper.equalWithComment
▸ match(otherHaab
): boolean
Ensure this Haab object has a matching configuration as another Haab object. Takes wildcards into account.
Name | Type |
---|---|
otherHaab |
Haab |
boolean
▸ next(): Haab
Return the next day in the Haab cycle
▸ Private
nextCalculator(): Haab
▸ setComment(comment
): any
Replace the current comment.
Name | Type |
---|---|
comment |
string | Comment |
any
▸ shift(numDays
): Haab
Move this date through the Haab cycle.
Name | Type |
---|---|
numDays |
number |
▸ toString(): string
Render the Haab fullDate as a string
string
▸ validate(): boolean
Ensure the Haab’s coefficients are within range and the month is defined
boolean