package me.prestige.bases; import org.apache.commons.lang.time.FastDateFormat; import java.text.DecimalFormat; import java.time.ZoneId; import java.util.Locale; import java.util.TimeZone; public final class DateTimeFormats { public static final TimeZone SERVER_TIME_ZONE; public static final ZoneId SERVER_ZONE_ID; public static final FastDateFormat DAY_MTH_HR_MIN_SECS; public static final FastDateFormat HR_MIN; public static final FastDateFormat MIN_SECS; public static final FastDateFormat KOTH_FORMAT; public static final ThreadLocal REMAINING_SECONDS; public static final ThreadLocal REMAINING_SECONDS_TRAILING; static { SERVER_TIME_ZONE = TimeZone.getTimeZone("EST"); SERVER_ZONE_ID = DateTimeFormats.SERVER_TIME_ZONE.toZoneId(); DAY_MTH_HR_MIN_SECS = FastDateFormat.getInstance("MM/dd/yy HH:mm:ss", DateTimeFormats.SERVER_TIME_ZONE, Locale.ENGLISH); HR_MIN = FastDateFormat.getInstance("hh:mm", DateTimeFormats.SERVER_TIME_ZONE, Locale.ENGLISH); KOTH_FORMAT = FastDateFormat.getInstance("m:ss", DateTimeFormats.SERVER_TIME_ZONE, Locale.ENGLISH); MIN_SECS = FastDateFormat.getInstance("mm:ss", DateTimeFormats.SERVER_TIME_ZONE, Locale.ENGLISH); REMAINING_SECONDS = new ThreadLocal() { @Override protected DecimalFormat initialValue() { return new DecimalFormat("0.#"); } }; REMAINING_SECONDS_TRAILING = new ThreadLocal() { @Override protected DecimalFormat initialValue() { return new DecimalFormat("0.0"); } }; } }