public class B2BDateFormatter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
B2BDATE |
static java.lang.String |
B2BDatePattern |
static int |
XMLDATE |
static java.lang.String |
xmlDatePattern |
Constructor and Description |
---|
B2BDateFormatter()
Default constructor
|
B2BDateFormatter(java.lang.String date,
int DateType)
Constructor which accepts a String date
which is either an XML or an B2B date.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
convertDateFormat(java.lang.String dateString,
int sourceType,
int newType)
Date string conversion (xml date -> b2b date or b2b date -> xml date)
|
java.lang.String |
getB2BDate()
Return the Date in B2B Format
|
java.util.Date |
getDate()
Return a java.util.date object
|
int |
getDateType()
Return the date format of the original date provided to this class
|
java.lang.String |
getPatternFormattedDate(java.lang.String pattern)
Return the Formatted date given by Pattern
|
java.lang.String |
getXMLDate()
Return the Date in XML Format
|
public static java.lang.String B2BDatePattern
public static java.lang.String xmlDatePattern
public static final int B2BDATE
public static final int XMLDATE
public B2BDateFormatter()
public B2BDateFormatter(java.lang.String date, int DateType) throws java.text.ParseException
date
- the DateDateType
- The type of the datejava.text.ParseException
public java.lang.String getPatternFormattedDate(java.lang.String pattern)
public java.util.Date getDate()
public int getDateType()
public java.lang.String getB2BDate()
public java.lang.String getXMLDate()
public static java.lang.String convertDateFormat(java.lang.String dateString, int sourceType, int newType)
dateString
- the date string to convertsourceType
- the source date typenewType
- the new type to convert to