title: If-Modified-Since Date Format
body: <p>I am writing a server and I would like to check for "If-Modified-Since: " header.<br>
  Since there are so many date methods, which methods should I consider to check, like a usual method (milliseconds is used in browsers)....    </p>
  
  <p>Following is how I did it for milliseconds format:</p>
  
  <pre><code>  Date date;
  
   //dateS is a substring of If-Modified-Since: header
   try{
    long mills = Long.parseLong(dateS);
    } catch (NumberFormatException e)
     {e.printStackTrace();
    }
    date = new Date(mills);
  </code></pre>
  
  <p>I also want to check for "Wed, 19 Oct 2005 10:50:00 GMT" format. How can I change that date into milliseconds?</p>
  
  <pre><code>     SimpleDateFormat dateFormat = new SimpleDateFormat(
                  "EEE, dd MMM yyyy HH:mm:ss z");
  
          // to check if-modified-since time is in the above format
          try {
  
              ifModifiedSince = dateFormat.parse(date);
              ?????????????????????
          } catch (ParseException e1) {
          }
  </code></pre>
  
  <p>Please help me with chaging the above and please tell me if there is any Date format that I should check for…</p>