UNPKG

@knora/api

Version:

JavaScript library that handles API requests to Knora

48 lines (47 loc) 1.37 kB
import { IBaseDateValue } from "../type-specific-interfaces/base-date-value"; import { ReadValue } from "./read-value"; export declare class ParseReadDateValue extends ReadValue implements IBaseDateValue { datestring: string; calendar: string; startDay?: number; startMonth?: number; startYear: number; startEra: string; endDay?: number; endMonth?: number; endYear: number; endEra: string; } /** * Precision for DateSalsah. */ export declare enum Precision { yearPrecision = 0, monthPrecision = 1, dayPrecision = 2 } /** * Represents a Salsah date object with a precision information. */ export declare class KnoraDate { readonly calendar: string; readonly era: string; readonly year: number; readonly month?: number | undefined; readonly day?: number | undefined; private static separator; readonly precision: Precision; constructor(calendar: string, era: string, year: number, month?: number | undefined, day?: number | undefined); } /** * Represents a period (with start date and end date). */ export declare class KnoraPeriod { readonly start: KnoraDate; readonly end: KnoraDate; constructor(start: KnoraDate, end: KnoraDate); } export declare class ReadDateValue extends ReadValue { date: KnoraDate | KnoraPeriod; constructor(date: ParseReadDateValue); }