read-gedcom
Version:
Gedcom file reader
20 lines • 701 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SelectionDatePunctual = void 0;
const internal_1 = require("./internal");
const parse_1 = require("../parse");
class SelectionDatePunctual extends internal_1.SelectionAny {
valueAsDate() {
return this.value().map(v => {
const date = (0, parse_1.parseDate)(v);
if (date !== null && date.isDatePunctual && !date.isDateApproximated) { // TODO check this
return date;
}
else {
return null;
}
});
}
}
exports.SelectionDatePunctual = SelectionDatePunctual;
//# sourceMappingURL=SelectionDatePunctual.js.map