Although i read a lot about the calendar and gregoriancalendar, still some complications arise. Which is better or what can you recommend to use? I cant not figure out the difference.
GregorianCalendar gc = (GregorianCalendar) GregorianCalendar.getInstance();
or
Calendar c = Calendar.getInstance();
what do you say?
Calendar is an abstract class, the getInstance method returns one of is implementations depending on the default Locale of your system. This means that if you are using an European or American locale, you'll be using the Gregorian Calendar anyway.
In any case, you should always try to use the Implementation according to the area you are, if the application is in Japan, you may have some problems, because the Japanese calendar is a bit different, for example
You can check it in the Android documentation: here
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