Here you can find the source of getShortFormatter(Locale locale)
private static DateTimeFormatter getShortFormatter(Locale locale)
//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); } }