public class ParsedDateFormat
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
char |
sep1
Separator character between the first two date components.
|
char |
sep2
Separator character between the last two date components.
|
int[] |
size
Size of each date component.
|
Modifier | Constructor and Description |
---|---|
private |
ParsedDateFormat(int[] size,
char sep1,
char sep2)
Construct an instance from the components.
|
Modifier and Type | Method and Description |
---|---|
private static void |
genDateFormatIncomleteError(java.lang.String fmt)
Record or throw the error number 154.
|
static ParsedDateFormat |
getInstance(java.lang.String fmt)
Parse the given format and use the parse results to create a new instance.
|
boolean |
hasSep()
Test if the format has separators.
|
public final char sep1
public final char sep2
public final int[] size
private ParsedDateFormat(int[] size, char sep1, char sep2)
size
- the array of 3 elements with sizes of date format componentssep1
- the value of the separator between the first and second format components or '\0' if the
format string has no separators.sep2
- the value of the separator between the second and third format components or '\0' if the
format string has no second separator.public final boolean hasSep()
public static final ParsedDateFormat getInstance(java.lang.String fmt) throws ErrorConditionException
throwExceptionOnError
an appropriate exception is
thrown or null
is returned to allow the caller to take whatever action it considers necessary.
This method will never return an invalid object.fmt
- The 4GL date format string to parse.ParsedDateFormat
for the fmt
requested, or null
if that is invalid.ErrorConditionException
- if the format is invalidprivate static final void genDateFormatIncomleteError(java.lang.String fmt)
fmt
- the problematic format string