Example usage for org.joda.time.format DateTimeFormat mediumDate

List of usage examples for org.joda.time.format DateTimeFormat mediumDate

Introduction

In this page you can find the example usage for org.joda.time.format DateTimeFormat mediumDate.

Prototype

public static DateTimeFormatter mediumDate() 

Source Link

Document

Creates a format that outputs a medium date format.

Usage

From source file:ro.activemall.photoxserver.utils.thymeleafJoda.JodaTimeExpressionObject.java

License:Open Source License

/**
 * Formats the datetime with a JodaTime medium date format
 *
 * @param dateTime/*from   w  w  w  .  ja va 2 s .com*/
 *            The datetime
 * @return The formatted date
 */
public String mediumDate(DateTime dateTime) {
    return format(dateTime, DateTimeFormat.mediumDate());
}

From source file:ru.caramel.juniperbot.core.message.resolver.DateTimePlaceholderResolver.java

License:Open Source License

@Override
public Object getChild(String name) {
    switch (name) {
    case "shortTime":
        return format(DateTimeFormat.shortTime());
    case "mediumTime":
        return format(DateTimeFormat.mediumTime());
    case "longTime":
        return format(DateTimeFormat.longTime());
    case "fullTime":
        return format(DateTimeFormat.fullTime());
    case "shortDate":
        return format(DateTimeFormat.shortDate());
    case "mediumDate":
        return format(DateTimeFormat.mediumDate());
    case "longDate":
        return format(DateTimeFormat.longDate()); // The same as medium
    case "fullDate":
        return format(DateTimeFormat.fullDate());
    case "shortDateTime":
        return format(DateTimeFormat.shortDateTime());
    case "mediumDateTime":
        return format(DateTimeFormat.mediumDateTime());
    case "longDateTime":
        return format(DateTimeFormat.longDateTime());
    case "fullDateTime":
        return format(DateTimeFormat.fullDateTime());
    }/*  www . j  a  v  a2 s  . c om*/
    return null;
}