cocina_display 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/cocina_display/concerns/events.rb +11 -10
- data/lib/cocina_display/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 87a645130e6859646e6da4e6467e2b147b94875426fd572af77fd0c759d27585
|
|
4
|
+
data.tar.gz: 88be964265cff6adaa48dbfbd733b01d22f66e08c05c91fa7b7d161ca3c6a1af
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 98614bc273ceb47c5b91d77fe2ae65749eb118ae4ac0318053e399be53040333b8063d40567be9c641109bb65a57367df72c74db407df9c81d65fb663bdb27e4
|
|
7
|
+
data.tar.gz: db732b08d482cc956624508c28564598fd47cb9ad734ca2e5acbffbf9c43dc5e79f34ce2e70066a99903a16d51829da643ef625ec97190cb6d5faf5e65a557ad
|
|
@@ -9,21 +9,22 @@ module CocinaDisplay
|
|
|
9
9
|
# @return [Date, nil]
|
|
10
10
|
# @see https://github.com/inukshuk/edtf-ruby
|
|
11
11
|
def pub_date_edtf(ignore_qualified: false)
|
|
12
|
-
date = pub_date(ignore_qualified: ignore_qualified)
|
|
13
|
-
return unless date
|
|
12
|
+
return unless (date = pub_date(ignore_qualified: ignore_qualified))
|
|
14
13
|
|
|
15
14
|
if date.is_a? CocinaDisplay::Dates::DateRange
|
|
16
|
-
|
|
15
|
+
if !date.start.date.is_a? EDTF::Unknown
|
|
16
|
+
edtf_date = date.start.date
|
|
17
|
+
elsif !date.stop.date.is_a? EDTF::Unknown
|
|
18
|
+
edtf_date = date.stop.date
|
|
19
|
+
end
|
|
20
|
+
else
|
|
21
|
+
edtf_date = date.date
|
|
17
22
|
end
|
|
18
23
|
|
|
19
|
-
|
|
20
|
-
return
|
|
24
|
+
return if edtf_date.is_a? EDTF::Unknown
|
|
25
|
+
return edtf_date.from if edtf_date.is_a?(EDTF::Interval)
|
|
21
26
|
|
|
22
|
-
|
|
23
|
-
edtf_date.from
|
|
24
|
-
else
|
|
25
|
-
edtf_date
|
|
26
|
-
end
|
|
27
|
+
edtf_date
|
|
27
28
|
end
|
|
28
29
|
|
|
29
30
|
# The earliest preferred publication year as an integer.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cocina_display
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.4.
|
|
4
|
+
version: 1.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nick Budak
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-10-
|
|
11
|
+
date: 2025-10-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: janeway-jsonpath
|