Closed aferditamuriqi closed 6 years ago
Currently dc:date
is treated as optional string, there is no date
parsed from the string. @llemeurfr
And it's not used anywhere is the code. There shouldn't be any error, also there is no warning.
In https://github.com/readium/webpub-manifest/tree/master/contexts/default#publication-date it is specified that the EPUB "dc:date" should be mapped to the "published" property in the webpub manifest, and exposed by the streamer.
Please verify if this is not the case, and correct it if this is missing. We'll then verify the other metadata which should be present in the webpub manifest.
It's already exposed as publicationDate
, although there is no parsing from String
to Date
.
It's just an optional String
. And it's not used anywhere else in the current codebase.
Do we need to rename it to published
?
if let date = metadataElement["dc:date"].value {
metadata.publicationDate = date
}
precisions:
in EPUB2, in order to represent the date of publication (published), dc:date must have no opf:event attribute (in such a case the dc:date represents another kind of date). There may be several dc:date elements with different opf:event attributes and I found no standard controlled vocab. for this attribute (which is therefore unusable).
in EPUB3, the opf:event attribute is deprecated and there is only one dc:date in the metadata element. Other dates are represented by specialized dcterms date elements. We may map some of them later on.
We have chosen to map the dc:date only if its value is a full date (2018-07-30) or date-time (2018-07-30T10:00:00Z). A year (2018) or year-month (2018-07) is not mapped. A badly formed date neither.
closing this issue manually as it was missing the fixing keyword closed with this PR https://github.com/readium/r2-streamer-swift/pull/72
kotlin issue here https://github.com/readium/kotlin-toolkit/issues/203