Interface DateService

All Known Implementing Classes:
JodaDateService

public interface DateService
Provides the current date.
  • Method Details

    • now

      org.joda.time.DateTime now()
      Returns:
      current date at the moment of the call
    • nowToString

      String nowToString()
      Returns:
      current date at the moment of the call
    • dateToString

      String dateToString(org.joda.time.DateTime dateTime)
      Parameters:
      dateTime - in DateTime format
      Returns:
      dateTime in String format
    • dateFromString

      org.joda.time.DateTime dateFromString(String date)
      Parameters:
      date - in String format
      Returns:
      dateTime in DateTime format
    • isOlderThan

      boolean isOlderThan(org.joda.time.DateTime dateTime, int min)
      Parameters:
      dateTime - date to compare with
      min - minutes that have to have past
      Returns:
      if datetime is older than minutes
    • isOlderThan

      boolean isOlderThan(String dateTime, int min)
      Parameters:
      dateTime - date to compare with in format String
      min - minutes that have to have past
      Returns:
      if datetime is older than minutes