Fixes
This commit is contained in:
parent
65f0e852d0
commit
577a85c9b1
3 changed files with 13 additions and 7 deletions
|
|
@ -54,6 +54,12 @@ const parseSource = source => {
|
|||
const readStream = fs.createReadStream(source)
|
||||
const jsonStream = readStream.pipe(ndjson.parse())
|
||||
jsonStream.on('data', individual => {
|
||||
_.forEach(period => {
|
||||
_.forEach(date => {
|
||||
const {year, month, day} = date
|
||||
date.date = new Date(year, month - 1, day)
|
||||
}, [period.start, period.end])
|
||||
}, individual.birthDatePeriods)
|
||||
individuals.push(individual)
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -93,9 +93,7 @@ function processDate (dateNode) {
|
|||
const year = parseInt(dateNode.Year)
|
||||
const month = parseInt(dateNode.Month)
|
||||
const day = parseInt(dateNode.Day)
|
||||
const date = new Date(year, month - 1, day)
|
||||
|
||||
return {year, month, day, date}
|
||||
return {year, month, day}
|
||||
}
|
||||
|
||||
function processFeature (featureNode) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue