read-gedcom
Version:
Gedcom file reader
16 lines • 514 B
JavaScript
import { SelectionAny } from './internal';
import { parseDate } from '../parse';
export class SelectionDatePunctual extends SelectionAny {
valueAsDate() {
return this.value().map(v => {
const date = parseDate(v);
if (date !== null && date.isDatePunctual && !date.isDateApproximated) { // TODO check this
return date;
}
else {
return null;
}
});
}
}
//# sourceMappingURL=SelectionDatePunctual.js.map