Skip to content

Commit

Permalink
Detect print publication date #2395
Browse files Browse the repository at this point in the history
  • Loading branch information
knirirr committed Sep 19, 2024
1 parent 2efe694 commit 862c65a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/Editor/EditPublications.vue
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,13 @@ export default {
this.newPublication.title = data.title;
this.newPublication.url = data["URL"];
if (data["created"]) {
let dateParts = data["created"]["date-parts"][0].toString();
let dateParts;
if (data['published-print']) {
dateParts = data["published-print"]["date-parts"][0].toString();
}
else {
dateParts = data["created"]["date-parts"][0].toString();
}
this.newPublication.year = Number(dateParts.split(",")[0]);
}
let authors = [];
Expand Down

0 comments on commit 862c65a

Please sign in to comment.