mirror of
https://github.com/dkam/paapi.git
synced 2025-12-28 15:14:52 +00:00
More comprehensive handling of failed date parsing
This commit is contained in:
@@ -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