UNPKG

@knora/viewer

Version:
30 lines (29 loc) 770 B
import { KnoraDate, ReadDateValue } from '@knora/api'; export declare class DateValueComponent { calendar: boolean; era: boolean; valueObject: ReadDateValue; dates: DateFormatter[]; period: boolean; private _calendar; private _era; private _dateValueObj; constructor(); /** * Converts a `KnoraDate` to a JS Date, providing necessary formatting information. * JULIAN and GREGORIAN calendar are the only available for the moment. * * @param date the date to be converted. * @return DateFormatter. */ getJSDate(date: KnoraDate): DateFormatter; } /** * Date structure for the template */ export interface DateFormatter { format: string; date: Date; era: string; calendar: string; }