Browse Source

polish

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2305 50f2f4bb-b051-0410-bef5-90022cba6387
pull/1/head
Keith Donald 16 years ago
parent
commit
35aefbb932
  1. 1
      org.springframework.context/src/main/java/org/springframework/format/annotation/ISODateTimeFormat.java
  2. 6
      org.springframework.context/src/main/java/org/springframework/format/datetime/joda/ISODateTimeFormatAnnotationFormatterFactory.java

1
org.springframework.context/src/main/java/org/springframework/format/annotation/ISODateTimeFormat.java

@ -22,6 +22,7 @@ import java.lang.annotation.Target; @@ -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
*/

6
org.springframework.context/src/main/java/org/springframework/format/datetime/joda/ISODateTimeFormatAnnotationFormatterFactory.java

@ -28,10 +28,10 @@ import org.springframework.format.annotation.ISODateTimeFormat.ISO; @@ -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();

Loading…
Cancel
Save