I'm trying to countdown to a time in the future (2024) and I have the time left from the users system to the exact date in 2024.
String input = "Mon Apr 08 2024 18:18:29 UTC";
Date date = new SimpleDateFormat("EEE MMM dd yyyy HH:mm:ss z", Locale.ENGLISH).parse(input);
long milliseconds = date.getTime();
long millisecondsFromNow = milliseconds - (new Date()).getTime();
That is my code, im trying to turn millisecondsFromNow
into a date a human can read, more specifically, years, months, days, hours, minutes, seconds and milliseconds left until the date.