public class

DateFormatter

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

Summary

Public Constructors
DateFormatter()
Public Methods
static String currentDate()
Format the current local date as YYYY/MM/DD.
static String currentDateGMT()
Format the current GMT date as YYYY/MM/DD.
static String formatLocalDate(String f)
Format the local date.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public DateFormatter ()

Public Methods

public static String currentDate ()

Format the current local date as YYYY/MM/DD.

public static String currentDateGMT ()

Format the current GMT date as YYYY/MM/DD.

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