patch for smart date handling

This will fix the bad date handling in your script and work out the difference between today and tomorrow automatically. It's not your fault, blame Yahoo for posting index[0] as yesterday's date.