Example usage for java.text SimpleDateFormat getDateTimeInstance

List of usage examples for java.text SimpleDateFormat getDateTimeInstance

Introduction

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

Prototype

public static final DateFormat getDateTimeInstance(int dateStyle, int timeStyle, Locale aLocale) 

Source Link

Document

Gets the date/time formatter with the given formatting styles 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);
}