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.Pattern TWELVE_HOUR_TIME
    A 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 long matchDate​(java.lang.String filter)  
    static long matchFutureDate​(java.lang.String filter)  
    static int matchMCWorldTime​(java.lang.String timeStr)
    Parse a time string into the MC world time.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • TWELVE_HOUR_TIME

      protected static final java.util.regex.Pattern TWELVE_HOUR_TIME
      A pattern that matches time given in 12-hour form (xx:xx(am|pm))
  • Constructor Details

  • 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.CommandException
      Parse 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