Package twitter4j

Class TimeSpanConverter

java.lang.Object
twitter4j.TimeSpanConverter
All Implemented Interfaces:
Serializable

public final class TimeSpanConverter extends Object implements Serializable
Since:
Twitter4J 2.1.0
See Also:
  • Constructor Details

    • TimeSpanConverter

      public TimeSpanConverter()
      Constructs an instance with default locale
    • TimeSpanConverter

      public TimeSpanConverter(Locale locale)
      Constructs an instance with the specified locale
      Parameters:
      locale - locale
  • Method Details

    • toTimeSpanString

      public String toTimeSpanString(LocalDateTime date)
      Parameters:
      date - date
      Returns:
      time span string
    • toTimeSpanString

      public String toTimeSpanString(long milliseconds)
      Parameters:
      milliseconds - time to span in milliseconds
      Returns:
      relative time