so i have 7 different button, i want to sethint on each button
with current date++
orderly.
DateTimeFormatter dateFormater = DateTimeFormatter.ofPattern("d");
ZoneId zone = ZoneId.of("Asia/Jakarta");
LocalDate date = LocalDate.now(zone);
int amount = 1;
int buttonCount = 7;
for (int i = 0; i < buttonCount; i++){
hari1.setHint(date.format(dateFormater));
date = date.plusDays(amount);
hari2.setHint(date.format(dateFormater));
date = date.plusDays(amount);
hari3.setHint(date.format(dateFormater));
date = date.plusDays(amount);
hari4.setHint(date.format(dateFormater));
date = date.plusDays(amount);
hari5.setHint(date.format(dateFormater));
date = date.plusDays(amount);
hari6.setHint(date.format(dateFormater));
date = date.plusDays(amount);
hari7.setHint(date.format(dateFormater));
}
date output start 27-28-29 ect. which is wrong becuse today date is 22. the output should be 22-23-24 ect right ? so i tried using calendar on date and the output is correct 22. why ? and is there solution so i can get the correct date and got it (date++) ? and is there another approach ? how ?
Date today = Calendar.getInstance().getTime();
final SimpleDateFormat fcDate = new SimpleDateFormat("dd");