2020-04-19 14:22:10 +02:00
|
|
|
import { isValid } from 'date-fns';
|
|
|
|
|
|
|
|
export class PollOption {
|
2020-04-21 17:26:25 +02:00
|
|
|
constructor(public label: string, public url?: string, public subOptions?: PollOption[]) {}
|
2020-04-19 14:22:10 +02:00
|
|
|
|
2020-04-21 17:26:25 +02:00
|
|
|
public isDatePoll(): boolean {
|
|
|
|
return isValid(this.label);
|
|
|
|
}
|
2020-04-19 14:22:10 +02:00
|
|
|
}
|