private String handleFTMBizzareDateFormat ( final String dateString ) { approximation = DateParser . Approximation . BETWEEN ; String string = stripPrefix ( dateString , "(" ) . trim ( ) ; string = stripSuffix ( string , ")" ) . trim ( ) ; if ( "BIC" . equals ( string ) ) { // BIC refers to LDS status "born in the covenant". Such a date can // be treated as a plain string with no approximation semantics. return "" ; } if ( startsWithIgnoreCase ( string , ABT ) ) { string = stripPrefix ( string , ABT ) . trim ( ) ; approximation = DateParser . Approximation . ABOUT ; } if ( startsWithIgnoreCase ( string , AFT ) ) { string = stripPrefix ( string , AFT ) . trim ( ) ; approximation = DateParser . Approximation . AFTER ; } if ( startsWithIgnoreCase ( string , BEF ) ) { string = stripPrefix ( string , BEF ) . trim ( ) ; approximation = DateParser . Approximation . BEFORE ; } if ( startsWithIgnoreCase ( string , FROM ) ) { string = stripPrefix ( string , FROM ) . trim ( ) ; } string = truncateAt ( string , "-" ) ; string = truncateAt ( string , " TO " ) ; if ( string . length ( ) <= 2 ) { // Probably like 10-11 Nov 2017 string = stripPrefix ( dateString , "(" ) . trim ( ) ; string = stripSuffix ( string , ")" ) . trim ( ) ; string = removeBeginningAt ( string , "-" ) ; string = removeBeginningAt ( string , " TO " ) ; } return string ; }
Handle some odd dates from family tree maker .