Skip to content

Commit

Permalink
RO-Crate export: fixed default publication date
Browse files Browse the repository at this point in the history
  • Loading branch information
floWetzels committed Jan 22, 2025
1 parent 5ce39f9 commit 134caf8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Json/Investigation.fs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ module Investigation =
Encode.tryInclude "title" Encode.string oa.Title
Encode.tryInclude "description" Encode.string oa.Description
Encode.tryInclude "submissionDate" Encode.string oa.SubmissionDate
"publicReleaseDate", Encode.string (oa.PublicReleaseDate |> (Option.defaultValue (System.DateTime.Today.ToString "yyyy/MM/dd"))) |> Some
"publicReleaseDate", Encode.string (oa.PublicReleaseDate |> (Option.defaultValue (System.DateTime.Today.ToString "yyyy-MM-dd"))) |> Some
Encode.tryIncludeSeq "ontologySourceReferences" OntologySourceReference.ROCrate.encoder oa.OntologySourceReferences
Encode.tryIncludeSeq "publications" Publication.ROCrate.encoder oa.Publications
Encode.tryIncludeSeq "people" Person.ROCrate.encoder oa.Contacts
Expand Down
2 changes: 1 addition & 1 deletion tests/Json/Investigation.Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ let private test_roCrateEmpty =
let test_defaultDate = testList "ROCrate-defaultDate" [
testCase "roundabout" <| fun _ ->
let addPublicationDate (inv : ArcInvestigation) =
inv.PublicReleaseDate <- Some (System.DateTime.Today.ToString "yyyy/MM/dd")
inv.PublicReleaseDate <- Some (System.DateTime.Today.ToString "yyyy-MM-dd")
inv
let obj = create_empty()
let json = ArcInvestigation.toROCrateJsonString () obj
Expand Down

0 comments on commit 134caf8

Please sign in to comment.