Some matching tests
This commit is contained in:
parent
f8ec2be6e8
commit
e7193e3948
5 changed files with 146 additions and 10 deletions
|
|
@ -20,6 +20,7 @@ function isDateWithinSomeDaysOfPeriod (period, date, days) {
|
|||
}
|
||||
|
||||
const isBornTooLongSince = _.curry((days, dateObject, individual) => {
|
||||
if (!dateObject) return false
|
||||
if (_.isEmpty(individual.birthDatePeriods)) return false
|
||||
const isWithinSomeYears = _.partialRight(isDateWithinSomeDaysOfPeriod, [dateObject.date, days])
|
||||
return !_.some(isWithinSomeYears, individual.birthDatePeriods)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue