I got this far, but my head is exploding rn from maths (I know , i might have some difficulities). The seconds, minutes, and hours works (because i didn't calculate it), but the rest is wrong, and im getting a overcalculation warning or something.PHP:long second = (millis / 1000) % 60;
long minute = (millis / (1000 * 60)) % 60;
long hour = (millis / (1000 * 60 * 60)) % 24;
long day = (millis / (1000 * 60 * 60 * 60)) % 7;
long week = (millis / (1000 * 60 * 60 * 60 * 60)) % 4;
long month = (millis / 1000 * 60 * 60 * 60 * 60 * 60) % 12;
long year = 0L;
String time = String.format("%02d : %02d : %02d : %02d : %02d : %02d : %02d", year, month, week, day, hour, minute, second);
In need of a time util
Discussion in 'Plugin Development' started by DoggyCode™, Jan 20, 2017.
- Thread Status:
- Not open for further replies.
- Thread Status:
- Not open for further replies.