提交 835b9589 编写于 作者: K Keith Donald

polish

上级 6f4112af
......@@ -22,6 +22,7 @@ import java.lang.annotation.Target;
/**
* Declares that a field should be formatted as a ISO date time.
* Can be applied to <code>java.util.Date</code>, <code>java.util.Calendar</code>, <code>java.long.Long</code>, or Joda Time fields.
* @author Keith Donald
* @since 3.0
*/
......
......@@ -28,10 +28,10 @@ import org.springframework.format.annotation.ISODateTimeFormat.ISO;
public final class ISODateTimeFormatAnnotationFormatterFactory extends AbstractDateTimeAnnotationFormatterFactory<ISODateTimeFormat> {
protected DateTimeFormatter configureDateTimeFormatterFrom(ISODateTimeFormat annotation) {
ISO style = annotation.value();
if (style == ISO.DATE) {
ISO format = annotation.value();
if (format == ISO.DATE) {
return org.joda.time.format.ISODateTimeFormat.date();
} else if (style == ISO.TIME) {
} else if (format == ISO.TIME) {
return org.joda.time.format.ISODateTimeFormat.time();
} else {
return org.joda.time.format.ISODateTimeFormat.dateTime();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册