|
IMC Epclient 5.0.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.spardat.enterprise.fmt.IFmt
at.spardat.enterprise.fmt.ADateFmt
This class supports formatting and parsig ADates. What makes this class different from java.text.DateFormat is the better implementation of the MEDIUM style. To put it briefly, you should only use the MEDIUM style for parsing of dates. Moreover, the formatting of dates with format MEDIUM has been highly optimized.
For styles other than MEDIUM, the implementation falls back to java.text.DateFormat.
| Field Summary | |
static int |
FULL
A very verbose representation, see java.text.DateFormat.FULL. |
static int |
LONG
A longer representation of a date, see java.text.DateFormat.LONG. |
static int |
MEDIUM
This is the default style. |
static int |
SHORT
denotes a predefined format, see java.text.DateFormat.SHORT. |
| Fields inherited from class at.spardat.enterprise.fmt.IFmt |
DEFAULT, LAST_STYLE, MANDATORY, style_ |
| Constructor Summary | |
ADateFmt()
|
|
| Method Summary | |
protected void |
checkDateRange(java.lang.String internal)
Utility-method that checks the date-ranges, if any. |
static ADateFmt |
getInstance(int style,
java.util.Locale locale)
Returns an IFmt providing a style and a locale. |
static ADateFmt |
getInstance(int style,
java.util.Locale locale,
int minDayRel,
int maxDayRel)
Returns an IFmt providing a style and a locale. |
static ADateFmt |
getInstance(int style,
java.util.Locale locale,
int minDayRel,
int maxDayRel,
java.lang.String minDate,
java.lang.String maxDate)
Returns an IFmt providing a style and a locale. |
static ADateFmt |
getInstance(int style,
java.util.Locale locale,
java.lang.String minDate,
java.lang.String maxDate)
Returns an IFmt providing a style and a locale. |
static ADateFmt |
getInstance(java.lang.String pattern)
Constructs an ADateFmt providing a pattern as specified in java.text.SimpleDateFormat. |
static ADateFmt |
getInstance(java.lang.String pattern,
int style)
Constructs an ADateFmt providing a pattern as specified in java.text.SimpleDateFormat. |
static ADateFmt |
getInstance(java.lang.String pattern,
int style,
java.util.Locale locale)
Constructs an ADateFmt providing a pattern as specified in java.text.SimpleDateFormat. |
int |
getMax()
Returns the upper bound for a date that is specified relatively to the current date. -1 is yesterday, 0 is today and 1 denotes tomorrow. |
java.lang.String |
getMaxDate()
Returns the upper bound for a date in the format yyyyMMdd,
or null if no such restriction is set. |
int |
getMin()
Returns the lower bound for a date that is specified relatively to the current date. -1 is yesterday, 0 is today and 1 denotes tomorrow. |
java.lang.String |
getMinDate()
Returns the lower bound for a date in the format yyyyMMdd,
or null if no such restriction is set. |
boolean |
isLegalInternal(java.lang.String internal)
Determines if the given string is a legal internal representation. |
boolean |
mayBeAppliedTo(byte type)
Defines if this formatter is able to successfully format a specified type. |
void |
setMax(int i)
Allows to set the upper bound for a date that is specified relatively to the current date. -1 is yesterday, 0 is today and 1 denotes tomorrow. |
void |
setMaxDate(java.lang.String maxDate)
Set the upper bound for a date in the format yyyyMMdd.
|
void |
setMin(int i)
Allows to set the lower bound for a date that is specified relatively to the current date. -1 is yesterday, 0 is today and 1 denotes tomorrow. |
void |
setMinDate(java.lang.String minDate)
Set the lower bound for a date in the format yyyyMMdd.
|
| Methods inherited from class at.spardat.enterprise.fmt.IFmt |
checkMandatory, clone, format, getStyle, isLegalExternalChar, isMandatory, isOneWay, maxLenOfExternal, parse, setMandatory |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int SHORT
public static final int MEDIUM
ADateFmtMediumSmart. Example: '24.04.2000'
public static final int LONG
public static final int FULL
| Constructor Detail |
public ADateFmt()
| Method Detail |
public static ADateFmt getInstance(int style,
java.util.Locale locale)
style - one of SHORT, MEDIUM, LONG or FULL or one of the IFmt-styles.locale - the locale to use
public static ADateFmt getInstance(int style,
java.util.Locale locale,
int minDayRel,
int maxDayRel)
style - one of SHORT, MEDIUM, LONG or FULL or one of the IFmt-styles.locale - the locale to useminDayRel - lower bound on acceptable dates expressed as day-offset
relative to today, i.e., -1 is yesterday, 0 is today, 1 stands
for tomorrow. Integer.MAX_VALUE stands for no restriction.maxDayRel - upper bound on acceptable dates expressed as day-offset
relative to today, i.e., -1 is yesterday, 0 is today, 1 stands
for tomorrow. Integer.MAX_VALUE stands for no restriction.
public static ADateFmt getInstance(int style,
java.util.Locale locale,
java.lang.String minDate,
java.lang.String maxDate)
style - one of SHORT, MEDIUM, LONG or FULL or one of the IFmt-styles.locale - the locale to useminDate - lower bound on acceptable dates in the format yyyyMMdd.
null and "" stand for no restriction.maxDate - upper bound on acceptable dates in the format yyyyMMdd.
null and "" stand for no restriction.
public static ADateFmt getInstance(int style,
java.util.Locale locale,
int minDayRel,
int maxDayRel,
java.lang.String minDate,
java.lang.String maxDate)
style - one of SHORT, MEDIUM, LONG or FULL or one of the IFmt-styles.locale - the locale to useminDayRel - lower bound on acceptable dates expressed as day-offset
relative to today, i.e., -1 is yesterday, 0 is today, 1 stands
for tomorrow. Integer.MAX_VALUE stands for no restriction.maxDayRel - upper bound on acceptable dates expressed as day-offset
relative to today, i.e., -1 is yesterday, 0 is today, 1 stands
for tomorrow. Integer.MAX_VALUE stands for no restriction.minDate - lower bound on acceptable dates in the format yyyyMMdd.
null and "" stand for no restriction.maxDate - upper bound on acceptable dates in the format yyyyMMdd.
null and "" stand for no restriction.public static ADateFmt getInstance(java.lang.String pattern)
public static ADateFmt getInstance(java.lang.String pattern,
int style)
pattern - a SimpleDateFormat pattern.style - may be MANDATORY
public static ADateFmt getInstance(java.lang.String pattern,
int style,
java.util.Locale locale)
pattern - a SimpleDateFormat pattern.style - may be MANDATORYlocale - as used in java.text.SimpleDateFormatpublic boolean isLegalInternal(java.lang.String internal)
IFmt
isLegalInternal in class IFmtinternal - the internal encoding.
IFmt.isLegalInternal(String)public boolean mayBeAppliedTo(byte type)
IFmt
mayBeAppliedTo in class IFmttype - a type constant defined in Types.IFmt.mayBeAppliedTo(byte)public int getMax()
public int getMin()
public void setMax(int i)
public void setMin(int i)
public java.lang.String getMaxDate()
yyyyMMdd,
or null if no such restriction is set.
public void setMaxDate(java.lang.String maxDate)
yyyyMMdd.
null and "" mean no restriction.
public java.lang.String getMinDate()
yyyyMMdd,
or null if no such restriction is set.
public void setMinDate(java.lang.String minDate)
yyyyMMdd.
null and "" mean no restriction.
protected void checkDateRange(java.lang.String internal)
internal - internal date String.
|
IMC Epclient 5.0.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||