mirror of
https://github.com/dkam/paapi.git
synced 2026-08-13 16:42:17 +00:00
More comprehensive handling of failed date parsing
This commit is contained in:
+2
-2
@@ -42,12 +42,12 @@ module Paapi
|
|||||||
|
|
||||||
def publication_date
|
def publication_date
|
||||||
d = get(%w{ItemInfo ContentInfo PublicationDate DisplayValue})
|
d = get(%w{ItemInfo ContentInfo PublicationDate DisplayValue})
|
||||||
return d.nil? ? nil : Date.parse(d)
|
return Date.parse(d) rescue nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def release_date
|
def release_date
|
||||||
d = get(%w{ItemInfo ProductInfo ReleaseDate DisplayValue})
|
d = get(%w{ItemInfo ProductInfo ReleaseDate DisplayValue})
|
||||||
return d.nil? ? nil : Date.parse(d)
|
return Date.parse(d) rescue nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def contributors
|
def contributors
|
||||||
|
|||||||
Reference in New Issue
Block a user