com.vividsolutions.jump.util
Class FlexibleDateParser

java.lang.Object
  extended by com.vividsolutions.jump.util.FlexibleDateParser

public class FlexibleDateParser
extends java.lang.Object

Warning: This class can parse a wide variety of formats. This flexibility is fine for parsing user input because the user immediately sees whether the parser is correct and can fix it if necessary. However, GML files are advised to stick with a safe format like yyyy-MM-dd. yy/MM/dd is not as safe because while 99/03/04 will be parsed as yyyy/MM/dd, 02/03/04 will be parsed as MM/dd/yyyy (because MM/dd/yyyy appears earlier than yyyy/MM/dd in FlexibleDateParser.txt).


Nested Class Summary
static class FlexibleDateParser.CellEditor
           
 
Constructor Summary
FlexibleDateParser()
           
 
Method Summary
static void main(java.lang.String[] args)
           
 java.util.Date parse(java.lang.String s, boolean lenient)
           
 void setVerbose(boolean b)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlexibleDateParser

public FlexibleDateParser()
Method Detail

parse

public java.util.Date parse(java.lang.String s,
                            boolean lenient)
                     throws java.text.ParseException
Returns:
null if s is empty
Throws:
java.text.ParseException

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

setVerbose

public void setVerbose(boolean b)