title: Check if the Calendar date is a sunday
body: <p>I am trying to figure out how to make my program count the number of Sundays in a week.</p>
  
  <p>I have tried the following thing:</p>
  
  <pre><code>if (date.DAY_OF_WEEK == date.SUNDAY) {
      System.out.println("Sunday!");
  }
  </code></pre>
  
  <p>Yet it does not seem to work?</p>
  
  <p>When I try to <code>System.out.Println the date.DAY_OF_WEEK</code> I get: <code>7</code></p>
  
  <p>Does anyone know how I can check if the current calendar date is Sunday?</p>
  
  <p><strong>UPDATE FOR MORE INFORMATION</strong></p>
  
  <ol>
  <li><p>firt of all the date.DAY_OF_WEEK is a Calendar object!</p></li>
  <li><p>i made sure to set the Calendar object <code>date</code> to a sunday </p></li>
  </ol>
  
  <p>The system out print where i get 7 is what it returns to me when i try to run <code>date.DAY_OF_MONTH</code> even if the day it set to a sunday</p>
  
  <p><strong>2nd UPDATE TO ALEX</strong></p>
  
  <p>This is more or less my code</p>
  
  <pre><code>Calendar startDate = Calendar.getInstance();
  
      startDate.set(2012, 12, 02);
      if (startDate.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {
          System.out.println("true");
      }else {
          System.out.println("FALSE");
      }
  </code></pre>