Class TimeParser

java.lang.Object
com.reve.utils.time.TimeParser

public class TimeParser extends Object
  • Constructor Details

    • TimeParser

      public TimeParser()
  • Method Details

    • getLongTime

      public long getLongTime(String time, String format)
      Get the given string time value as long value.
      Parameters:
      time - time value in string
      format - date time format for the given time value.
      Returns:
      the long timestamp for the given time value.
    • setTimeInCalendar

      public void setTimeInCalendar(Calendar calendar, String time, String format)
      Set the given time into the given Calendar instance. The time value will be parsed according to the given time format.
      Parameters:
      calendar - time will be set to this Calendar instance.
      time - this time will be parsed and set to the given Calendar instance.
      format - time will be parsed using this format.