I have been looking and searching a lot for this question. I'm really stupid when it comes to using the JAVA Calendar class.
Could anybody please help me to show a simple way of how to get the current time (on the android phone) and check whether is the first Sunday of the month or not.
// Comments in the code examples are very welcome :-)
Calendar cal = Calendar.getInstance();
if (Calendar.SUNDAY == cal.get(Calendar.DAY_OF_WEEK) && cal.get(Calendar.DAY_OF_MONTH) <= 7)
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