<pre>
<steveny> Never do this:
<steveny> Calendar calendar = Calendar.getInstance(Locale.US);
<steveny> calendar.set(Calendar.MONTH, month);
<steveny> calendar.set(Calendar.YEAR, year);
<steveny> if it is the 31st now (the calendar.getInstance() returns the current time)
<steveny> setting the month to a month with < 31 days
<steveny> will cause the calendar be set to the 1st of the next month
<darrend> niiiice
<steveny> yep
<richier> greatest API design evAR
<steveny> so never do that ;)
</pre>
|
|