maya-dates

@drewsonne/maya-dates / Exports / CalendarRoundFactory

Class: CalendarRoundFactory

Parses Calendar Round strings into concrete objects.

Example

const cr = new CalendarRoundFactory().parse('4 Ajaw 8 Kumk\'u');

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new CalendarRoundFactory()

Defines the pattern describing a Calendar Round

Overrides

Factory.constructor

Defined in

factory/calendar-round.ts:21

Properties

pattern

pattern: RegExp

Inherited from

Factory.pattern

Defined in

factory/base.ts:5

Methods

isNumberString

isNumberString(potentialNumber): boolean

Parameters

Name Type
potentialNumber string

Returns

boolean

Defined in

factory/calendar-round.ts:52


parse

parse(raw): CalendarRound

Parse a textual Calendar Round representation.

Parameters

Name Type Description
raw string String containing the Calendar Round.

Returns

CalendarRound

Parsed CalendarRound instance.

Defined in

factory/calendar-round.ts:35


split

split(raw): string[]

Split the provided fullDate into its components

Parameters

Name Type
raw string

Returns

string[]

Access

protected

Inherited from

Factory.split

Defined in

factory/base.ts:25