Package com.palmergames.util
Class TimeMgmt
java.lang.Object
com.palmergames.util.TimeMgmt
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doublestatic final doublestatic final doublestatic final double -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcountdownTimeHoursRaw(long l) static StringcountdownTimeMinutesRaw(long l) static StringcountdownTimeSecondsRaw(long l) static StringformatCountdownTime(long l) static StringformatCountdownTime(Long l, Locale locale) static StringformatCountdownTimeHours(long l, org.bukkit.entity.Player player) static StringformatCountdownTimeMinutes(long l, org.bukkit.entity.Player player) static StringformatCountdownTimeSeconds(long l, org.bukkit.entity.Player player) static StringgetFormattedTimeValue(double timeMillis) static longCalculates the time in seconds until the next new day event.static longtownyTime(boolean cache) Calculates the time in seconds until the next new day event.
-
Field Details
-
ONE_SECOND_IN_MILLIS
public static final double ONE_SECOND_IN_MILLIS- See Also:
-
ONE_MINUTE_IN_MILLIS
public static final double ONE_MINUTE_IN_MILLIS- See Also:
-
ONE_HOUR_IN_MILLIS
public static final double ONE_HOUR_IN_MILLIS- See Also:
-
ONE_DAY_IN_MILLIS
public static final double ONE_DAY_IN_MILLIS- See Also:
-
-
Constructor Details
-
TimeMgmt
public TimeMgmt()
-
-
Method Details
-
formatCountdownTime
-
formatCountdownTime
-
countdownTimeHoursRaw
-
countdownTimeMinutesRaw
-
countdownTimeSecondsRaw
-
formatCountdownTimeHours
-
formatCountdownTimeMinutes
-
formatCountdownTimeSeconds
-
getFormattedTimeValue
-
townyTime
public static long townyTime()Calculates the time in seconds until the next new day event. TimeZone specific, including daylight savings.- Returns:
- seconds until event
-
townyTime
public static long townyTime(boolean cache) Calculates the time in seconds until the next new day event. TimeZone specific, including daylight savings.- Parameters:
cache- - Whether to use caching or not.- Returns:
- seconds until event
-