Package com.sk89q.commandbook.util
Class InputUtil.TimeParser
java.lang.Object
com.sk89q.commandbook.util.InputUtil.TimeParser
- Enclosing class:
- InputUtil
public static class InputUtil.TimeParser
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description protected static java.util.regex.PatternTWELVE_HOUR_TIMEA pattern that matches time given in 12-hour form (xx:xx(am|pm)) -
Constructor Summary
Constructors Constructor Description TimeParser() -
Method Summary
Modifier and Type Method Description static longmatchDate(java.lang.String filter)static longmatchFutureDate(java.lang.String filter)static intmatchMCWorldTime(java.lang.String timeStr)Parse a time string into the MC world time.
-
Field Details
-
TWELVE_HOUR_TIME
protected static final java.util.regex.Pattern TWELVE_HOUR_TIMEA pattern that matches time given in 12-hour form (xx:xx(am|pm))
-
-
Constructor Details
-
TimeParser
public TimeParser()
-
-
Method Details
-
matchDate
public static long matchDate(java.lang.String filter) throws com.sk89q.minecraft.util.commands.CommandException- Throws:
com.sk89q.minecraft.util.commands.CommandException
-
matchFutureDate
public static long matchFutureDate(java.lang.String filter) throws com.sk89q.minecraft.util.commands.CommandException- Throws:
com.sk89q.minecraft.util.commands.CommandException
-
matchMCWorldTime
public static int matchMCWorldTime(java.lang.String timeStr) throws com.sk89q.minecraft.util.commands.CommandExceptionParse a time string into the MC world time.- Parameters:
timeStr- the time string to parse- Returns:
- the world time
- Throws:
com.sk89q.minecraft.util.commands.CommandException
-