Class DateFormatter

java.lang.Object
com.pnfsoftware.jeb.util.format.DateFormatter

public class DateFormatter extends Object
Utility methods to format dates.
  • Constructor Details

    • DateFormatter

      public DateFormatter()
  • Method Details

    • formatLocalDate

      public static String formatLocalDate(String f)
      Format the local date.

      The following patterns are replaced:
      - YYYY : year, 4 digits
      - YY : year, last 2 digits
      - MM : month, forcing 2 digits
      - M : month
      - DD : day of month, forcing 2 digits
      - D : day of month

      Parameters:
      f - format string
      Returns:
      the formatted string
    • currentDate

      public static String currentDate()
      Format the current local date as YYYY/MM/DD.
      Returns:
    • currentDateGMT

      public static String currentDateGMT()
      Format the current GMT date as YYYY/MM/DD.
      Returns: