New Billion Graves design update#117
Conversation
Update from master
Merge from master
|
The dates didn't parse correctly for me in the Thomas Krysinski example. The normal JS date parse will assume dates and it works off a 0-11 month calculation if I recall. In any case, when I parse Thomas, it gives me these dates. Birth: I'd suggest maybe trying to use the parseDate function in the popup.js and if you wanted to format it.. maybe something like this? function displayDate(vardate) {
let formattedDate = ""
if ("day" in vardate && "month" in vardate && "year" in vardate) {
let date = moment({ year: vardate["year"], month: vardate["month"] - 1 , day: vardate["day"] });
formattedDate = date.format("MMMM D, YYYY");
} else if ("month" in vardate && "year" in vardate) {
let date = moment({ year: vardate["year"], month: vardate["month"] - 1 })
formattedDate = date.format("MMMM YYYY");
} else if ("year" in vardate){
let date = moment({ year: vardate["year"]});
formattedDate = date.format("YYYY");
}
return formattedDate;
}``` |
|
Perhaps it takes into account some locale of the browser |
|
@eljeffeg see changes |
|
By the way, Worth taking a look when thinking about other problems too |
|
@eljeffeg i think it's ready |
| } | ||
|
|
||
| function getData(htmlstring) { | ||
| return JSON.parse(htmlstring.split('<script type="application/ld+json">')[1].split('</script>')[0]); |
There was a problem hiding this comment.
@eljeffeg this is the part I really dislike. I couldn't fetch <script> content via jQuery, so try to take a look if it's possible.
No. #112 is also blocked, some work needs to be done there on a deeper level |
|
@eljeffeg - requesting your attention :) |
TL;DR
for every profile - (e.g. Thomas F Krysinski)
there's a part of the HTML with a json with the details.
Load this and use it instead of HTML parsing - this way -- add support to new BillionGraves
Solves #116 , Solves #106