title: time vs date vs calendar java
body: <p>Well in my app I want to get current date and month abnd local hour (currentTimeZone hour) and depending on its value display some things.</p>
  
  <p>i have read several sollutions and I have used the following:</p>
  
  <pre><code>Calendar c = Calendar.getInstance(); 
              int day=c.get(Calendar.DATE);
              int month=c.get(Calendar.MONTH);
  </code></pre>
  
  <p>or this</p>
  
  <pre><code>Time today = new Time(Time.getCurrentTimezone());
              today.setToNow();
              int day2=today.monthDay;
              int month2=today.month;
  </code></pre>
  
  <p>my questions are: </p>
  
  <p>1)which of this is more "Stable" considering their results? I mean that it will not have any problem.</p>
  
  <p>2)Moreover, did they both take into consideration the TimeZone? I think that the second one does, but what about the calendar?</p>
  
  <p>3)I tried this code that I have found:</p>
  
  <pre><code>SimpleDateFormat s = new SimpleDateFormat("ddMMyyyyhhmmss");
              String format = s.format(new Date());
  </code></pre>
  
  <p>and i get the error that Date() must have an argument. weird because in every answer they use it like that.</p>
  
  <p>What is wrong?</p>
  
  <p>4) What do you suggest me to use? The only thing I want is a simple comparison between current month,date,hour with some stored in memory. (for example if its January 29, display that event. if it is 19.00 am send notification and so on.)</p>