[Solved] show remaining minutes instead of hours
Barebones solution: long remainingMillis = countdownEnds.getTime() – System.currentTimeMillis(); long remainingMinutes = TimeUnit.MILLISECONDS.toMinutes(remainingMillis); String countdownEndsString = String.format(“%d minutes”, remainingMinutes); For a nicer solution use java.time, the modern Java date and time API, for the calculation of the minutes: long remainingMinutes = ChronoUnit.MINUTES.between( Instant.now(), DateTimeUtils.toInstant(countdownEnds)); In this case also see if you can get rid of the … Read more