From 704c9f6e8d978b3187bd9d77a55f40aabf0ac1c3 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Mon, 19 Jul 2021 20:10:31 +0200 Subject: reduce: temp fix 0 source release year --- skate/reduce.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'skate') diff --git a/skate/reduce.go b/skate/reduce.go index 8658ffe..8913cae 100644 --- a/skate/reduce.go +++ b/skate/reduce.go @@ -382,7 +382,10 @@ func ZippyWayback(refs, cdx io.Reader, w io.Writer) error { bref.SourceReleaseIdent = ref.ReleaseIdent bref.SourceWorkIdent = ref.WorkIdent bref.SourceReleaseStage = ref.ReleaseStage - bref.SourceYear = fmt.Sprintf("%d", ref.ReleaseYear) + // TODO: track down the 0 year docs. + if ref.ReleaseYear > 1800 { + bref.SourceYear = fmt.Sprintf("%d", ref.ReleaseYear) + } bref.RefIndex = ref.Index + 1 // we want 1-index (also helps with omitempty) bref.RefKey = ref.Key if cdx.NumRows == 0 { -- cgit v1.2.3