why does the following return 0?
int currMonth = c.get(Calendar.MONTH);
The Months are numbered from 0 (January) to 11 (December).
Reference:
Calendar.MONTH
Not natural indexing, but unnatural thinking of Sun people. :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With