MCPcopy Create free account
hub / github.com/5zig/The-5zig-Mod / convertToTimeWithMinutes

Method convertToTimeWithMinutes

Utils/src/eu/the5zig/util/Utils.java:355–361  ·  view source on GitHub ↗

Creates a String in HH:MM-Format for showing time. @param millis Time in milliseconds. @return a String in HH:MM-Format.

(long millis)

Source from the content-addressed store, hash-verified

353 * @return a String in HH:MM-Format.
354 */
355 public static String convertToTimeWithMinutes(long millis) {
356 Date dateTime = new Date(millis);
357 Calendar calendar = Calendar.getInstance();
358 calendar.setTime(dateTime);
359 DateFormat timeFormatter = DateFormat.getTimeInstance(DateFormat.SHORT);
360 return timeFormatter.format(dateTime);
361 }
362
363 /**
364 * Creates a String in HH:MM:SS-Format for showing time.

Callers 5

drawMethod · 0.95
drawMethod · 0.95
chatLineClickedMethod · 0.95
chatLineClickedMethod · 0.95
replacePlaceholdersMethod · 0.95

Calls 3

setTimeMethod · 0.80
formatMethod · 0.80
getInstanceMethod · 0.45

Tested by

no test coverage detected