Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Begin/Rescue for IMDB invalid dates #7

Merged
merged 1 commit into from Aug 25, 2015
Merged

Begin/Rescue for IMDB invalid dates #7

merged 1 commit into from Aug 25, 2015

Conversation

jermspeaks
Copy link
Contributor

Needs a begin/rescue block for IMDB dates that are invalid. Fall back to date given from API instead of re-formatting.

Needs a begin/rescue block for IMDB dates that are invalid. Fall back to date given from API instead of re-formatting.
@denkristoffer
Copy link
Owner

Hi there, thanks for the pull request. Do you have any examples of titles where the current date handling doesn't work?

@jermspeaks
Copy link
Contributor Author

There were a few I found.

When I looked at the date, it only gave a year, but nothing else. Here's what I got when I ran it through a REPL.

2.1.5 :004 > require 'Date'
 => true
2.1.5 :005 > Date.strptime('1954', '%Y-%m-%d')
ArgumentError: invalid date
    from (irb):5:in `strptime'
    from (irb):5
    from $HOME/.rvm/rubies/ruby-2.1.5/bin/irb:11:in `<main>'

denkristoffer pushed a commit that referenced this pull request Aug 25, 2015
Begin/Rescue for IMDB invalid dates
@denkristoffer denkristoffer merged commit 72ed081 into denkristoffer:master Aug 25, 2015
@denkristoffer
Copy link
Owner

Thanks, this is now in Film Buff 1.0! 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants