maya-dates

@drewsonne/maya-dates / Exports / Haab

Class: 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"));

Hierarchy

Implements

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new Haab(coeff, month)

Constructor

Parameters

Name Type Description
coeff ICoefficient The position in the Haab month for this date
month Wildcard | HaabMonth  

Overrides

CommentWrapper.constructor

Defined in

cr/haab.ts:45

Properties

coeff

coeff: ICoefficient

Defined in

cr/haab.ts:36


comment

comment: Comment

Attached comment.

Inherited from

CommentWrapper.comment

Defined in

comment-wrapper.ts:11


month

month: Wildcard | HaabMonth

Defined in

cr/haab.ts:37


nextHolder

Private nextHolder: null | Haab

Defined in

cr/haab.ts:38

Accessors

name

get name(): string

Return a string representation of the Haab month name

Returns

string

Defined in

cr/haab.ts:117

Methods

appendComment

appendComment(comment): any

Append additional text to the current comment.

Parameters

Name Type
comment string | Comment

Returns

any

Inherited from

CommentWrapper.appendComment

Defined in

comment-wrapper.ts:34


commentIsEqual

commentIsEqual(otherCommentWrapper): boolean

Compare this wrapper’s comment against another wrapper.

Parameters

Name Type
otherCommentWrapper CommentWrapper

Returns

boolean

Inherited from

CommentWrapper.commentIsEqual

Defined in

comment-wrapper.ts:52


equal

equal(other): boolean

Compare this object with another for equality.

Parameters

Name Type
other IPart

Returns

boolean

Implementation of

IPart.equal

Defined in

cr/haab.ts:178


equalWithComment

equalWithComment(otherCommentWrapper): boolean

Check equality including the associated comment.

Parameters

Name Type
otherCommentWrapper IPart

Returns

boolean

Inherited from

CommentWrapper.equalWithComment

Defined in

comment-wrapper.ts:59


match

match(otherHaab): boolean

Ensure this Haab object has a matching configuration as another Haab object. Takes wildcards into account.

Parameters

Name Type
otherHaab Haab

Returns

boolean

Defined in

cr/haab.ts:103


next

next(): Haab

Return the next day in the Haab cycle

Returns

Haab

Defined in

cr/haab.ts:95


nextCalculator

Private nextCalculator(): Haab

Returns

Haab

Defined in

cr/haab.ts:143


setComment

setComment(comment): any

Replace the current comment.

Parameters

Name Type
comment string | Comment

Returns

any

Inherited from

CommentWrapper.setComment

Defined in

comment-wrapper.ts:20


shift

shift(numDays): Haab

Move this date through the Haab cycle.

Parameters

Name Type
numDays number

Returns

Haab

Defined in

cr/haab.ts:126


toString

toString(): string

Render the Haab fullDate as a string

Returns

string

Defined in

cr/haab.ts:174


validate

validate(): boolean

Ensure the Haab’s coefficients are within range and the month is defined

Returns

boolean

Defined in

cr/haab.ts:69