@drewsonne/maya-dates
Version:
Typescript package to manipulate dates in the Maya Calendar
44 lines (43 loc) • 1.62 kB
TypeScript
export interface CorrelationData {
maya_long_count: string;
event: string;
calendar_round: string;
correlation_jdn: number;
western_calendar: 'gregorian' | 'julian';
western_date: string;
direct_in_source: boolean;
source_western_date: string | null;
source: string;
}
export interface CorrelationMetadata {
generated_at: string;
description: string;
calendars: {
gregorian: string;
julian: string;
};
correlation_constants: number[];
sources: Record<string, {
id: string;
title: string;
author: string;
publisher: string;
url: string;
notes: string;
}>;
fields: Record<string, string>;
}
export interface CorrelationTestData {
metadata: CorrelationMetadata;
data: CorrelationData[];
}
export declare function loadCorrelationData(): CorrelationTestData;
export declare function getDataByCorrelation(correlationJdn: number): CorrelationData[];
export declare function getDataByCalendar(calendar: 'gregorian' | 'julian'): CorrelationData[];
export declare function getDataByLongCount(longCount: string): CorrelationData[];
export declare function getDirectSourceData(): CorrelationData[];
export declare function getGMTCorrelationData(): CorrelationData[];
export declare function getUniqueLongCounts(): string[];
export declare function getAvailableCorrelations(): number[];
export declare function findCorrelation(criteria: Partial<CorrelationData>): CorrelationData | undefined;
export declare function findCorrelations(criteria: Partial<CorrelationData>): CorrelationData[];