Package org.locationtech.jts.jump.util
Class FlexibleDateParser
- java.lang.Object
-
- org.locationtech.jts.jump.util.FlexibleDateParser
-
public class FlexibleDateParser extends 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
Nested Classes Modifier and Type Class Description static class
FlexibleDateParser.CellEditor
-
Constructor Summary
Constructors Constructor Description FlexibleDateParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(String[] args)
Date
parse(String s, boolean lenient)
void
setVerbose(boolean b)
-
-
-
Method Detail
-
parse
public Date parse(String s, boolean lenient) throws ParseException
- Returns:
- null if s is empty
- Throws:
ParseException
-
setVerbose
public void setVerbose(boolean b)
-
-