title: Right way to format date with strings like today, yesterday, tomorrow etc
body: <p>I have a date textview. And my textview holds a date string like 2011.09.17. Well I still do want to have that but I also want to add some more user friendly info for some specific dates like today or yesterday. For example if today is 2011.09.17 I want my textview to have value of yesterday instead 2011.09.16 and today instead 2011.09.17.</p>
  
  <p>well I already managed to do this :), but in the ugly way :(. I do this with a lot of 'if->than' which is really uglly and what ever I want to add some new rule like if the date is older than one year I want to put string like last year or so.... I really need to add ugly logic.</p>
  
  <p>My question is is there a nicer way to do this ? is there something like design pattern for this ? What is the recommended way to do this ? I am sure that many people have encounter this kind of problems</p>
  
  <p>if there some bather approach than thousand of ifs ? if not thanks any way at least I will stop searching for bather solution</p>
  
  <p>any suggestions , snippet or so will be appreciated</p>
  
  <p>Thanks </p>