Example usage for java.text SimpleDateFormat getDateInstance

List of usage examples for java.text SimpleDateFormat getDateInstance

Introduction

In this page you can find the example usage for java.text SimpleDateFormat getDateInstance.

Prototype

public static final DateFormat getDateInstance(int style, Locale aLocale) 

Source Link

Document

Gets the date formatter with the given formatting style for the given locale.

Usage

From source file:org.freeplane.features.format.FormatController.java

private PatternFormat createLocalPattern(String name, int dateStyle, Integer timeStyle) {
    final SimpleDateFormat simpleDateFormat = (SimpleDateFormat) (timeStyle == null
            ? SimpleDateFormat.getDateInstance(dateStyle, locale)
            : SimpleDateFormat.getDateTimeInstance(dateStyle, timeStyle, locale));
    final String dStyle = PatternFormat.STYLE_DATE;
    final String dType = IFormattedObject.TYPE_DATE;
    return createFormat(simpleDateFormat.toPattern(), dStyle, dType, name, locale);
}