public class DatePattern
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
DatePattern.DmyPattern |
Constructor and Description |
---|
DatePattern(java.lang.String dmtpat)
Constructor: creates a regular expression to extract a date based on a template.
|
Modifier and Type | Method and Description |
---|---|
int |
get(char field)
Retrieve the value of the field.
|
visad.DateTime |
getDateTime() |
java.lang.String |
getRegex()
Get the regular expression that is generated from the template
|
java.util.List<java.lang.Character> |
getValidFields()
Return the fields for which the template matched the search string.
|
static void |
main(java.lang.String[] args) |
boolean |
match(java.lang.String search)
Match a search string against the compile pattern.
|
public DatePattern(java.lang.String dmtpat)
dmtpat
- the user defined date/time patternpublic java.util.List<java.lang.Character> getValidFields()
public int get(char field)
field
- the field to retrieve the value forpublic boolean match(java.lang.String search)
search
- the search stringpublic java.lang.String getRegex()
public visad.DateTime getDateTime()
public static void main(java.lang.String[] args)