Java DateTimeFormatter getShortFormatter(Locale locale)

Here you can find the source of getShortFormatter(Locale locale)

Description

get Short Formatter

License

Open Source License

Declaration

private static DateTimeFormatter getShortFormatter(Locale locale) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.time.format.DateTimeFormatter;
import java.util.Locale;

public class Main {
    private static final String SHORT_PATTERN_EN = "yyyy-MM-dd";
    private static final String SHORT_PATTERN_FR = "dd/MM/yyyy";

    private static DateTimeFormatter getShortFormatter(Locale locale) {
        String pattern = SHORT_PATTERN_EN;
        if (Locale.FRANCE.equals(locale))
            pattern = SHORT_PATTERN_FR;/*from  w ww. j  a va2 s . c om*/
        return DateTimeFormatter.ofPattern(pattern);
    }
}

Related

  1. getIndexGroupingPeriod_slow(String date_format)
  2. getLocalizedDateFormat( final Locale LOCALE)
  3. getParsedTimeOrNull(String timeText, DateTimeFormatter formatForDisplayTime, DateTimeFormatter formatForMenuTimes, ArrayList formatsForParsing, Locale timePickerLocale)
  4. getPreferredDateFormat()
  5. getShortDateManualEntryFormatter()
  6. getStartOfDay(Date dateToFormat)
  7. getTime(final String time, final DateTimeFormatter formatter)
  8. getTime(String format)
  9. getTimeFromEpochMilli(String value, boolean shortFormat, String errorText)