public static DateTimeFormatter generateDefaultFormatterCE ( Locale pickerLocale ) { DateTimeFormatter formatCE = new DateTimeFormatterBuilder ( ) . parseLenient ( ) . parseCaseInsensitive ( ) . appendLocalized ( FormatStyle . LONG , null ) . toFormatter ( pickerLocale ) ; // Get the local language as a string. String language = pickerLocale . getLanguage ( ) ; // Override the format for the turkish locale to remove the name of the weekday. if ( "tr" . equals ( language ) ) { formatCE = PickerUtilities . createFormatterFromPatternString ( "dd MMMM yyyy" , pickerLocale ) ; } // Return the generated format. return formatCE ; }
generateDefaultFormatterCE This returns a default formatter for the specified locale that can be used for displaying or parsing AD dates . The formatter is generated from the default FormatStyle . LONG formatter in the specified locale .