title: Android Date format inside ListView
body: <p>Thanks to <a href="https://stackoverflow.com/users/22904/giulio-piancastelli">Giulio Piancastelli</a> I now have a list view with multiple line capabilities.  Now I am having an issue formatting the date on the second line.  All the dates are the same.  In the feed they are different.  I need someone to help me format my dates in the format of Day, Month, Year (Thursday, October 27, 2011).</p>
  
  <p>This is the code that <strong>doesn't work</strong>:</p>
  
  <pre><code> List&lt;Map&lt;String, String&gt;&gt; data = new ArrayList&lt;Map&lt;String, String&gt;&gt;();
      for (RSSItem item : feed.getAllItems()) {
          Map&lt;String, String&gt; datum = new HashMap&lt;String, String&gt;(2);
          datum.put("title", item.getTitle());
  
          String dateStr = item.getPubDate();
          SimpleDateFormat curFormater = new SimpleDateFormat("EEEE, MMMM dd, yyyy"); 
          Date dateObj = new Date();
          try {
              dateObj = curFormater.parse(dateStr);
          } catch (ParseException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          } 
          SimpleDateFormat postFormater = new SimpleDateFormat("EEEE, MMMM dd, yyyy"); 
  
          String newDateStr = postFormater.format(dateObj);
  
          datum.put("date", newDateStr);
          data.add(datum);
      }
      SimpleAdapter adapter = new SimpleAdapter(this, data,
                                                android.R.layout.simple_list_item_2,
                                                new String[] {"title", "date"},
                                                new int[] {android.R.id.text1,
                                                           android.R.id.text2});
  
      itemlist.setAdapter(adapter);
  
      itemlist.setOnItemClickListener(this);
  
      itemlist.setSelection(0);
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/bapfO.png" alt="Repeating date"></p>
  
  <p>If I remove my previous date code it works fine, but is formatted incorrectly.</p>
  
  <p>This code <strong>does work, but is formatted incorrectly</strong>:</p>
  
  <pre><code>List&lt;Map&lt;String, String&gt;&gt; data = new ArrayList&lt;Map&lt;String, String&gt;&gt;();
      for (RSSItem item : feed.getAllItems()) {
          Map&lt;String, String&gt; datum = new HashMap&lt;String, String&gt;(2);
          datum.put("title", item.getTitle());
          datum.put("date", item.getPubDate().toString());
          data.add(datum);
      }
      SimpleAdapter adapter = new SimpleAdapter(this, data,
                                                android.R.layout.simple_list_item_2,
                                                new String[] {"title", "date"},
                                                new int[] {android.R.id.text1,
                                                           android.R.id.text2});
  
      itemlist.setAdapter(adapter);
  
      itemlist.setOnItemClickListener(this);
  
      itemlist.setSelection(0);
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Xqbid.png" alt="incorrect date format"></p>
  
  <p>I need someone to help me format my dates in the format of Day, Month, Year (Thursday, October 27, 2011).  Thank you!</p>