import { ContentType } from "../ContentType"; import { IContentType } from "../ContentType.interface"; export class DateContent extends ContentType implements IContentType { readonly start: string readonly end: string readonly timeZone: string constructor(dateRawJson: any) { super(dateRawJson) const timeContent = this.content as { start: string, end: string, time_zone: string } this.start = timeContent.start this.end = timeContent.end this.timeZone = timeContent.time_zone } toHTML(): string { let timeContext = '' if (this.start) { timeContext +=`` } if (this.end) { timeContext +=`` } return timeContext } }