Skip to content

Commit d48f388

Browse files
committed
Polish Javadoc for @⁠DateTimeFormat
1 parent bbbb7c3 commit d48f388

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Diff for: spring-context/src/main/java/org/springframework/format/annotation/DateTimeFormat.java

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,6 +25,9 @@
2525
/**
2626
* Declares that a field or method parameter should be formatted as a date or time.
2727
*
28+
* <p>Formatting applies to parsing a date/time object from a string as well as printing a
29+
* date/time object to a string.
30+
*
2831
* <p>Supports formatting by style pattern, ISO date time pattern, or custom format pattern string.
2932
* Can be applied to {@link java.util.Date}, {@link java.util.Calendar}, {@link Long} (for
3033
* millisecond timestamps) as well as JSR-310 {@code java.time} value types.
@@ -33,7 +36,8 @@
3336
* The first character of the code is the date style, and the second character is the time style.
3437
* Specify a character of 'S' for short style, 'M' for medium, 'L' for long, and 'F' for full.
3538
* The date or time may be omitted by specifying the style character '-' &mdash; for example,
36-
* 'M-' specifies a medium format for the date with no time.
39+
* 'M-' specifies a medium format for the date with no time. The supported style pattern codes
40+
* correlate to the enum constants defined in {@link java.time.format.FormatStyle}.
3741
*
3842
* <p>For ISO-based formatting, set the {@link #iso} attribute to the desired {@link ISO} format,
3943
* such as {@link ISO#DATE}.
@@ -65,6 +69,8 @@
6569
* @author Juergen Hoeller
6670
* @author Sam Brannen
6771
* @since 3.0
72+
* @see java.text.DateFormat
73+
* @see java.text.SimpleDateFormat
6874
* @see java.time.format.DateTimeFormatter
6975
*/
7076
@Documented
@@ -77,6 +83,8 @@
7783
* <p>Defaults to 'SS' for short date, short time. Set this attribute when you
7884
* wish to format your field or method parameter in accordance with a common
7985
* style other than the default style.
86+
* <p>See the {@linkplain DateTimeFormat class-level documentation} for further
87+
* details.
8088
* @see #fallbackPatterns
8189
*/
8290
String style() default "SS";

0 commit comments

Comments
 (0)