maya-dates

@drewsonne/maya-dates / Exports / Tzolkin

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

Hierarchy

Implements

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new Tzolkin(newCoeff, newDay)

Constructor

Parameters

Name Type Description
newCoeff ICoefficient The position in the 260-day cycle
newDay Wildcard | TzolkinDay  

Overrides

CommentWrapper.constructor

Defined in

cr/tzolkin.ts:45

Properties

coeff

coeff: ICoefficient

Defined in

cr/tzolkin.ts:37


comment

comment: Comment

Attached comment.

Inherited from

CommentWrapper.comment

Defined in

comment-wrapper.ts:11


day

day: Wildcard | TzolkinDay

Defined in

cr/tzolkin.ts:36


nextHolder

Private nextHolder: null | Tzolkin

Defined in

cr/tzolkin.ts:38

Accessors

name

get name(): string | Wildcard

Return a string representation of the 260-day cycle name

Returns

string | Wildcard

Defined in

cr/tzolkin.ts:164

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

Ensure this Tzolkin object has the same configuration as another Tzolkin object. Does not take wildcards into account.

Parameters

Name Type
other IPart

Returns

boolean

Implementation of

IPart.equal

Defined in

cr/tzolkin.ts:134


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(newTzolkin): boolean

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

Parameters

Name Type
newTzolkin Tzolkin

Returns

boolean

Defined in

cr/tzolkin.ts:147


next

next(): Tzolkin

Return the next day in the 260-day cycle

Returns

Tzolkin

Defined in

cr/tzolkin.ts:69


nextCalculator

nextCalculator(): Tzolkin

Returns

Tzolkin

Defined in

cr/tzolkin.ts:108


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(newIncremental): Tzolkin

Parameters

Name Type
newIncremental number

Returns

Tzolkin

Defined in

cr/tzolkin.ts:93


toString

toString(): string

Render the 260-day cycle fullDate as a string

Returns

string

Defined in

cr/tzolkin.ts:175


validate

validate(): boolean

Ensure the Tzolkin’s coefficients are within range and the day is defined

Returns

boolean

Defined in

cr/tzolkin.ts:77