Ruby apparently has a date function that I'm using here. The reason it didn't always pull data was because it had the input as YYYY-DD-MM, when it needed to be YYYY-MM-DD. Required the 'require 'date'' line at 4.