Calendar.HOUR value range is from 0 - 11. This means that
calendar.set(Calendar.HOUR,12) will switch the date to next day 0. If we want to get 12pm current day
calendar.set(Calendar.HOUR,0);
calendar.set(Calendar.AM_PM,Calendar.PM)
calendar.set(Calendar.HOUR,12) will switch the date to next day 0. If we want to get 12pm current day
calendar.set(Calendar.HOUR,0);
calendar.set(Calendar.AM_PM,Calendar.PM)
No comments:
Post a Comment