Here you can find the source of getPreferredDateFormat()
public static DateTimeFormatter getPreferredDateFormat()
//package com.java2s; //License from project: Open Source License import java.time.format.DateTimeFormatter; public class Main { private static final DateTimeFormatter preferredDateFormat = DateTimeFormatter.ofPattern("dd-MM-yyyy"); public static DateTimeFormatter getPreferredDateFormat() { return preferredDateFormat; }//from w w w . j ava 2s .c o m }