title: Using a DatePicker in Android dev: How do I compare the date picked to today's date?
body: <p>I'm really stuck with a certain problem and I'm hoping someone can help me understand the problem and come to a solution. I've looked online a fair bit but can't see an answer unless it's been staring me in the face :-/</p>
  
  <p>Basically, I'm creating a very basic TV Guide app. It parses data from an RSS feed which has days offset (yesterday was -1. today is 0, tomorrow is 1, etc etc) and I'm trying to implement a DatePicker that allows the user to see what is on a particular channel when they select yesterday, today, tomorrow, etc.. but if they pick a date that is out-with the range (at the moment it's a week in advance), a simple Toast message will be displayed. </p>
  
  <p>My questions I guess are, firstly, how do I use maybe an IF ELSE to either parse the specific channel data for the day the user wants or display an error Toast message, and, how do I go about converting the days from what the user has put in compared to the actual date today into integers? If they select yesterday's date it will go to URL "<a href="http://example.com/-1/channel" rel="nofollow">http://example.com/-1/channel</a>", if they select tomorrow's date it will go to URL "<a href="http://example.com/1/channel" rel="nofollow">http://example.com/1/channel</a>" etc etc etc.</p>
  
  <p>Code is available if anyone needs to see it, but I think if someone would be kind enough to explain the logic, I'd like to see if I can come to the answer myself...</p>
  
  <p>Thanks a lot folks!!</p>