Skip to content

Commit

Permalink
fix: issue #79
Browse files Browse the repository at this point in the history
  • Loading branch information
R. S. Doiel committed Sep 25, 2024
1 parent 11acb2e commit 19ea39a
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 20 deletions.
9 changes: 9 additions & 0 deletions crossref.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ func getWorksSubjects(work *crossrefapi.Works) []*simplified.Subject {
return nil
}


func getWorksPublishedPrint(work *crossrefapi.Works) *simplified.DateType {
if work.Message != nil && work.Message.PublishedPrint != nil {
return crosswalkWorksDateObjectToDateType(work.Message.PublishedPrint, "published print")
Expand All @@ -418,6 +419,14 @@ func getWorksPublishedOnline(work *crossrefapi.Works) *simplified.DateType {
}

func getWorksPublicationDate(work *crossrefapi.Works) string {
var pubDate *simplified.DateType
if work.Message != nil && work.Message.Published != nil {
pubDate = crosswalkWorksDateObjectToDateType(work.Message.Published, "published date")
}
if pubDate != nil && pubDate.Date != "" {
return pubDate.Date
}
// If pubDate isn't available then guess what it should be.
printDate := getWorksPublishedPrint(work)
onlineDate := getWorksPublishedOnline(work)
acceptedDate := getWorksAccepted(work)
Expand Down
4 changes: 2 additions & 2 deletions doi2rdm.1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%doi2rdm(1) irdmtools user manual | version 0.0.87 8739c105
%doi2rdm(1) irdmtools user manual | version 0.0.87 11acb2ed
% R. S. Doiel and Tom Morrell
% 2024-09-23
% 2024-09-25

# NAME

Expand Down
4 changes: 2 additions & 2 deletions ep3ds2citations.1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%ep3ds2citations(1) irdmtools user manual | version 0.0.87 8739c105
%ep3ds2citations(1) irdmtools user manual | version 0.0.87 11acb2ed
% R. S. Doiel and Tom Morrell
% 2024-09-23
% 2024-09-25

# NAME

Expand Down
4 changes: 2 additions & 2 deletions ep3util.1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%ep3util(1) irdmtools user manual | version 0.0.87 8739c105
%ep3util(1) irdmtools user manual | version 0.0.87 11acb2ed
% R. S. Doiel and Tom Morrell
% 2024-09-23
% 2024-09-25

# NAME

Expand Down
4 changes: 2 additions & 2 deletions eprint2rdm.1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%eprint2rdm(1) irdmtools user manual | version 0.0.87 8739c105
%eprint2rdm(1) irdmtools user manual | version 0.0.87 11acb2ed
% R. S. Doiel and Tom Morrell
% 2024-09-23
% 2024-09-25

# NAME

Expand Down
4 changes: 2 additions & 2 deletions eprintrest.1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%eprintrest(1) irdmtools user manual | version 0.0.87 8739c105
%eprintrest(1) irdmtools user manual | version 0.0.87 11acb2ed
% R. S. Doiel and Tom Morrell
% 2024-09-23
% 2024-09-25

# NAME

Expand Down
4 changes: 2 additions & 2 deletions people2vocabulary.1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%people2vocabulary(1) irdmtools user manual | version 0.0.87 8739c105
%people2vocabulary(1) irdmtools user manual | version 0.0.87 11acb2ed
% R. S. Doiel
% 2024-09-23
% 2024-09-25

# NAME

Expand Down
4 changes: 2 additions & 2 deletions rdm2eprint.1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%rdm2eprint(1) irdmtools user manual | version 0.0.87 8739c105
%rdm2eprint(1) irdmtools user manual | version 0.0.87 11acb2ed
% R. S. Doiel and Tom Morrell
% 2024-09-23
% 2024-09-25

# NAME

Expand Down
4 changes: 2 additions & 2 deletions rdmds2citations.1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%rdmds2citations(1) irdmtools user manual | version 0.0.87 8739c105
%rdmds2citations(1) irdmtools user manual | version 0.0.87 11acb2ed
% R. S. Doiel and Tom Morrell
% 2024-09-23
% 2024-09-25

# NAME

Expand Down
4 changes: 2 additions & 2 deletions rdmutil.1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%rdmutil(1) irdmtools user manual | version 0.0.87 8739c105
%rdmutil(1) irdmtools user manual | version 0.0.87 11acb2ed
% R. S. Doiel and Tom Morrell
% 2024-09-23
% 2024-09-25

# NAME

Expand Down
4 changes: 2 additions & 2 deletions version.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ const (
Version = "0.0.87"

// ReleaseDate, the date version.go was generated
ReleaseDate = "2024-09-23"
ReleaseDate = "2024-09-25"

// ReleaseHash, the Git hash when version.go was generated
ReleaseHash = "8739c105"
ReleaseHash = "11acb2ed"

LicenseText = `
Redistribution and use in source and binary forms, with or without
Expand Down

0 comments on commit 19ea39a

Please sign in to comment.