diff --git a/assets/components/actors/actor.vue b/assets/components/actors/actor.vue
index ec0a2d10..231de1c0 100644
--- a/assets/components/actors/actor.vue
+++ b/assets/components/actors/actor.vue
@@ -75,7 +75,10 @@
>
Date of death
- {{ formatDate(actor.dateOfDeath, 'MMMM D, YYYY') }}{{ actor.ageAtDeath }}
+ {{ formatDate(actor.dateOfDeath, 'MMMM D, YYYY') }}{{ actor.ageAtDeath }}
567648000000 // over 18
- && profile.birthdate)
+ const dateOfBirth = profile.dateOfBirth || profile.birthdate;
+
+ curatedProfile.dateOfBirth = (!Number.isNaN(Number(dateOfBirth)) // possibly valid date
+ && new Date() - dateOfBirth > 567648000000 // over 18
+ && dateOfBirth)
|| null;
curatedProfile.dateOfDeath = Number.isNaN(Number(profile.dateOfDeath)) ? null : profile.dateOfDeath;
@@ -255,8 +257,6 @@ async function interpolateProfiles(actors) {
profile.date_of_birth = getMostFrequentDate(valuesByProperty.date_of_birth);
profile.date_of_death = getMostFrequentDate(valuesByProperty.date_of_death);
- console.log(valuesByProperty.date_of_birth, profile.date_of_birth);
-
profile.birth_city = getMostFrequent(valuesByProperty.birth_city);
profile.birth_state = getMostFrequent(valuesByProperty.birth_state);
profile.birth_country_alpha2 = getMostFrequent(valuesByProperty.birth_country_alpha2);
diff --git a/src/scrapers/bang.js b/src/scrapers/bang.js
index 1e48d79e..7dc51fce 100644
--- a/src/scrapers/bang.js
+++ b/src/scrapers/bang.js
@@ -3,8 +3,9 @@
const bhttp = require('bhttp');
const { post } = require('../utils/http');
-const slugify = require('../utils/slugify');
+const { extractDate } = require('../utils/qu');
const { inchesToCm } = require('../utils/convert');
+const slugify = require('../utils/slugify');
const clusterId = '617fb597b659459bafe6472470d9073a';
const authKey = 'YmFuZy1yZWFkOktqVDN0RzJacmQ1TFNRazI=';
@@ -87,6 +88,7 @@ function scrapeProfile(actor) {
const profile = {};
profile.aliases = actor.aliases;
+ profile.dateOfBirth = extractDate(actor.birthDate);
profile.gender = ({ F: 'female', M: 'male' })[actor.gender];
profile.ethnicity = actor.ethnicity;