maya-dates

@drewsonne/maya-dates / Exports / LongCount

Class: LongCount

Long Count cycle

Hierarchy

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new LongCount(...cycles)

Parameters

Name Type Description
...cycles (number | Wildcard)[] Components in the long count (eg, K’in, Winal, Bak’tun, etc)

Overrides

DistanceNumber.constructor

Defined in

lc/long-count.ts:28

Properties

comment

comment: Comment

Attached comment.

Inherited from

DistanceNumber.comment

Defined in

comment-wrapper.ts:11


correlationConstant

Private correlationConstant: CorrelationConstant

Defined in

lc/long-count.ts:22


datePattern

datePattern: RegExp

Inherited from

DistanceNumber.datePattern

Defined in

lc/distance-number.ts:12


parts

parts: (number | Wildcard)[]

Inherited from

DistanceNumber.parts

Defined in

lc/distance-number.ts:11


sign

sign: number

Inherited from

DistanceNumber.sign

Defined in

lc/distance-number.ts:13

Accessors

bakTun

get bakTun(): number | Wildcard

Return the bak’tun component of the fullDate

Returns

number | Wildcard

Inherited from

DistanceNumber.bakTun

Defined in

lc/distance-number.ts:261

set bakTun(newBakTun): void

Set the bak’tun component of the fullDate

Parameters

Name Type
newBakTun number | Wildcard

Returns

void

Inherited from

DistanceNumber.bakTun

Defined in

lc/distance-number.ts:253


gregorian

get gregorian(): GregorianCalendarDate

Return a Gregorian representation of this long count date, offset by the correlation constant.

Returns

GregorianCalendarDate

Defined in

lc/long-count.ts:59


isNegative

get isNegative(): boolean

Return true if the Long Count is operating as a negative Distance Number.

Returns

boolean

Inherited from

DistanceNumber.isNegative

Defined in

lc/distance-number.ts:59

set isNegative(newNegative): void

Set this Long Count as being a negative Distance Number

Parameters

Name Type
newNegative boolean

Returns

void

Inherited from

DistanceNumber.isNegative

Defined in

lc/distance-number.ts:75


isPositive

get isPositive(): boolean

Return true if the Long Count is positive.

Returns

boolean

Inherited from

DistanceNumber.isPositive

Defined in

lc/distance-number.ts:51

set isPositive(newPositive): void

Set this Long Count as being a Long Count or a positive Distance Number

Parameters

Name Type
newPositive boolean

Returns

void

Inherited from

DistanceNumber.isPositive

Defined in

lc/distance-number.ts:67


julian

get julian(): JulianCalendarDate

Return a Julian representation of this long count date, offset by the correlation constant.

Returns

JulianCalendarDate

Defined in

lc/long-count.ts:67


julianDay

get julianDay(): number

Return a representation of this Long Count in Julian Days.

Returns

number

Defined in

lc/long-count.ts:51


kAtun

get kAtun(): number | Wildcard

Return the k’atun component of the fullDate

Returns

number | Wildcard

Inherited from

DistanceNumber.kAtun

Defined in

lc/distance-number.ts:246

set kAtun(newKAtun): void

Set the k’atun component of the fullDate

Parameters

Name Type
newKAtun number | Wildcard

Returns

void

Inherited from

DistanceNumber.kAtun

Defined in

lc/distance-number.ts:238


kIn

get kIn(): number | Wildcard

Return the k’in component of the fullDate

Returns

number | Wildcard

Inherited from

DistanceNumber.kIn

Defined in

lc/distance-number.ts:201

set kIn(newKIn): void

Set the k’in component of the fullDate

Parameters

Name Type
newKIn number | Wildcard

Returns

void

Inherited from

DistanceNumber.kIn

Defined in

lc/distance-number.ts:193


kalabtun

get kalabtun(): number | Wildcard

Return the kalabtun component of the fullDate

Returns

number | Wildcard

Inherited from

DistanceNumber.kalabtun

Defined in

lc/distance-number.ts:291

set kalabtun(newBakTun): void

Set the kalabtun component of the fullDate

Parameters

Name Type
newBakTun number | Wildcard

Returns

void

Inherited from

DistanceNumber.kalabtun

Defined in

lc/distance-number.ts:283


kinchiltun

get kinchiltun(): number | Wildcard

Return the kinchiltun component of the fullDate

Returns

number | Wildcard

Inherited from

DistanceNumber.kinchiltun

Defined in

lc/distance-number.ts:306

set kinchiltun(newBakTun): void

Set the kinchiltun component of the fullDate

Parameters

Name Type
newBakTun number | Wildcard

Returns

void

Inherited from

DistanceNumber.kinchiltun

Defined in

lc/distance-number.ts:298


lordOfNight

get lordOfNight(): LordOfTheNight

Returns

LordOfTheNight

Defined in

lc/long-count.ts:83


piktun

get piktun(): number | Wildcard

Return the piktun component of the fullDate

Returns

number | Wildcard

Inherited from

DistanceNumber.piktun

Defined in

lc/distance-number.ts:276

set piktun(newBakTun): void

Set the piktun component of the fullDate

Parameters

Name Type
newBakTun number | Wildcard

Returns

void

Inherited from

DistanceNumber.piktun

Defined in

lc/distance-number.ts:268


sigParts

get sigParts(): (number | Wildcard)[]

Only digits in the LC with significant digits

Returns

(number | Wildcard)[]

Inherited from

DistanceNumber.sigParts

Defined in

lc/distance-number.ts:119


tun

get tun(): number | Wildcard

Return the tun component of the fullDate

Returns

number | Wildcard

Inherited from

DistanceNumber.tun

Defined in

lc/distance-number.ts:231

set tun(newTun): void

Set the tun component of the fullDate

Parameters

Name Type
newTun number | Wildcard

Returns

void

Inherited from

DistanceNumber.tun

Defined in

lc/distance-number.ts:223


winal

get winal(): number | Wildcard

Return the winal component of the fullDate

Returns

number | Wildcard

Inherited from

DistanceNumber.winal

Defined in

lc/distance-number.ts:216

set winal(newWinal): void

Set the winal component of the fullDate

Parameters

Name Type
newWinal number | Wildcard

Returns

void

Inherited from

DistanceNumber.winal

Defined in

lc/distance-number.ts:208

Methods

appendComment

appendComment(comment): any

Append additional text to the current comment.

Parameters

Name Type
comment string | Comment

Returns

any

Inherited from

DistanceNumber.appendComment

Defined in

comment-wrapper.ts:34


asDistanceNumber

asDistanceNumber(): DistanceNumber

Return this Long Count as a Distance Number

Returns

DistanceNumber

Defined in

lc/long-count.ts:138


buildCalendarRound

buildCalendarRound(): CalendarRound

Returns

CalendarRound

Defined in

lc/long-count.ts:93


buildFullDate

buildFullDate(): FullDate

Returns

FullDate

Defined in

lc/long-count.ts:103


clone

clone(): LongCount

Create a copy object of this long count fullDate

Returns

LongCount

Overrides

DistanceNumber.clone

Defined in

lc/long-count.ts:75


commentIsEqual

commentIsEqual(otherCommentWrapper): boolean

Compare this wrapper’s comment against another wrapper.

Parameters

Name Type
otherCommentWrapper CommentWrapper

Returns

boolean

Inherited from

DistanceNumber.commentIsEqual

Defined in

comment-wrapper.ts:52


equal

equal(other): boolean

Given two long count dates, check if they are equal

Parameters

Name Type
other IPart

Returns

boolean

Inherited from

DistanceNumber.equal

Defined in

lc/distance-number.ts:84


equalWithComment

equalWithComment(otherCommentWrapper): boolean

Check equality including the associated comment.

Parameters

Name Type
otherCommentWrapper IPart

Returns

boolean

Inherited from

DistanceNumber.equalWithComment

Defined in

comment-wrapper.ts:59


exactlyEqual

exactlyEqual(other): boolean

Given two long count dates, check if they are exactly equal

Parameters

Name Type
other DistanceNumber

Returns

boolean

Inherited from

DistanceNumber.exactlyEqual

Defined in

lc/distance-number.ts:106


getDateSections

getDateSections(index): number | Wildcard

Get specific column in Long Count fullDate

Parameters

Name Type
index number

Returns

number | Wildcard

Inherited from

DistanceNumber.getDateSections

Defined in

lc/distance-number.ts:144


getPosition

getPosition(): number

Count the number of days since 0.0.0.0.0 for this LC.

Returns

number

Inherited from

DistanceNumber.getPosition

Defined in

lc/distance-number.ts:331


gt

gt(newLongCount): boolean

Compare is this LC is less than the supplied LC.

Parameters

Name Type
newLongCount DistanceNumber

Returns

boolean

Inherited from

DistanceNumber.gt

Defined in

lc/distance-number.ts:186


isPartial

isPartial(): boolean

Returns true if any of the positions in the Long Count have been assigned a {Wildcard} object.

Returns

boolean

Inherited from

DistanceNumber.isPartial

Defined in

lc/distance-number.ts:323


isValid

isValid(): boolean

Ensure the fullDate has only numbers and wildcards separated by points.

Returns

boolean

Inherited from

DistanceNumber.isValid

Defined in

lc/distance-number.ts:314


lt

lt(newLongCount): boolean

Compare if this LC is greater than the supplied LC.

Parameters

Name Type
newLongCount DistanceNumber

Returns

boolean

Inherited from

DistanceNumber.lt

Defined in

lc/distance-number.ts:177


map

map(fn): any[]

Pass the map down to the parts

Parameters

Name Type
fn (lcPart: number | Wildcard, lcPartIndex: number) => any

Returns

any[]

Inherited from

DistanceNumber.map

Defined in

lc/distance-number.ts:168


minus

minus(newLc): LongcountSubtraction

Return the difference between this Long Count and the supplied

Parameters

Name Type
newLc LongCount

Returns

LongcountSubtraction

Overrides

DistanceNumber.minus

Defined in

lc/long-count.ts:127


normalise

normalise(): DistanceNumber

Make sure the elements of the Long Count do not exceed

Returns

DistanceNumber

Inherited from

DistanceNumber.normalise

Defined in

lc/distance-number.ts:391


plus

plus(newLc): LongcountAddition

Return the sum of this Long Count and the supplied

Parameters

Name Type
newLc LongCount

Returns

LongcountAddition

Overrides

DistanceNumber.plus

Defined in

lc/long-count.ts:115


setComment

setComment(comment): any

Replace the current comment.

Parameters

Name Type
comment string | Comment

Returns

any

Inherited from

DistanceNumber.setComment

Defined in

comment-wrapper.ts:20


setCorrelationConstant

setCorrelationConstant(newConstant): LongCount

Chainable method to set the correlation constant

Parameters

Name Type
newConstant CorrelationConstant

Returns

LongCount

Defined in

lc/long-count.ts:42


setDateSections

setDateSections(index, newValue): LongCount

Set specific column in Long Count fullDate

Parameters

Name Type
index number
newValue number | Wildcard

Returns

LongCount

Inherited from

DistanceNumber.setDateSections

Defined in

lc/distance-number.ts:158


toString

toString(): string

Convert the LongCount to a string and pad the sections of the fullDate

Returns

string

Inherited from

DistanceNumber.toString

Defined in

lc/distance-number.ts:421


fromDistanceNumber

Static fromDistanceNumber(dn): LongCount

Parameters

Name Type
dn DistanceNumber

Returns

LongCount

Defined in

lc/long-count.ts:18