Class DateString

java.lang.Object
edu.cnu.mdi.format.DateString

public final class DateString extends Object
Thread-safe date and time formatting helpers.
  • Method Details

    • dateString

      public static String dateString()
      Returns the current time.
      Returns:
      a string representation of the current time, down to seconds.
    • dateStringMM

      public static String dateStringMM()
      Returns the current time.
      Returns:
      a string representation of the current time, down to minutes.
    • dateStringMM

      public static String dateStringMM(long longtime)
      Returns the current time.
      Parameters:
      longtime - the time in millis.
      Returns:
      a string representation of the current time, down to minutes.
    • dateStringLong

      public static String dateStringLong()
      Returns the current time.
      Returns:
      a string representation of the current time, down to seconds.
    • dateStringSS

      public static String dateStringSS(long longtime)
      Returns the current time.
      Parameters:
      longtime - The time in millis.
      Returns:
      a string representation of the current time, down to seconds.
    • dateStringSS

      public static String dateStringSS()
      Returns the current time.
      Returns:
      a string representation of the current time, down to seconds.
    • dateStringShort

      public static String dateStringShort(long ltime)
      Returns the current time.
      Parameters:
      ltime - a time in milliseconds.
      Returns:
      a string representation of the current time, down to seconds but without day information.
    • dateStringShort

      public static String dateStringShort()
      Returns the current time.
      Returns:
      a string representation of the current time, down to seconds but without day information.