LANG-998 - Javadoc is not clear on preferred pattern to instantiate FastDateParser / FastDatePrinter
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1589551 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
649a089ddc
commit
f4b7d62ac5
|
@ -30,6 +30,16 @@ import java.util.TimeZone;
|
|||
* <p>FastDateFormat is a fast and thread-safe version of
|
||||
* {@link java.text.SimpleDateFormat}.</p>
|
||||
*
|
||||
* <p>To obtain an instance of FastDateFormat, use one of the static factory methods:
|
||||
* {@link #getInstance(String, TimeZone, Locale)}, {@link #getDateInstance(int, TimeZone, Locale)},
|
||||
* {@link #getTimeInstance(int, TimeZone, Locale)}, or {@link #getDateTimeInstance(int, int, TimeZone, Locale)}
|
||||
* </p>
|
||||
*
|
||||
* <p>Since FastDateFormat is thread safe, you can use a static member instance:</p>
|
||||
* <code>
|
||||
* private static final FastDateFormat DATE_FORMATTER = FastDateFormat.getDateTimeInstance(FastDateFormat.LONG, FastDateFormat.SHORT);
|
||||
* </code>
|
||||
*
|
||||
* <p>This class can be used as a direct replacement to
|
||||
* {@code SimpleDateFormat} in most formatting and parsing situations.
|
||||
* This class is especially useful in multi-threaded server environments.
|
||||
|
|
|
@ -41,6 +41,14 @@ import java.util.regex.Pattern;
|
|||
* <p>FastDateParser is a fast and thread-safe version of
|
||||
* {@link java.text.SimpleDateFormat}.</p>
|
||||
*
|
||||
* <p>To obtain a proxy to a FastDateParser, use {@link FastDateFormat#getInstance(String, TimeZone, Locale)}
|
||||
* or another variation of the factory methods of {@link FastDateFormat}.</p>
|
||||
*
|
||||
* <p>Since FastDateParser is thread safe, you can use a static member instance:</p>
|
||||
* <code>
|
||||
* private static final DateParser DATE_PARSER = FastDateFormat.getInstance("yyyy-MM-dd");
|
||||
* </code>
|
||||
*
|
||||
* <p>This class can be used as a direct replacement for
|
||||
* <code>SimpleDateFormat</code> in most parsing situations.
|
||||
* This class is especially useful in multi-threaded server environments.
|
||||
|
|
|
@ -38,6 +38,14 @@ import org.apache.commons.lang3.Validate;
|
|||
* <p>FastDatePrinter is a fast and thread-safe version of
|
||||
* {@link java.text.SimpleDateFormat}.</p>
|
||||
*
|
||||
* <p>To obtain a proxy to a FastDatePrinter, use {@link FastDateFormat#getInstance(String, TimeZone, Locale)}
|
||||
* or another variation of the factory methods of {@link FastDateFormat}.</p>
|
||||
*
|
||||
* <p>Since FastDatePrinter is thread safe, you can use a static member instance:</p>
|
||||
* <code>
|
||||
* private static final DatePrinter DATE_PRINTER = FastDateFormat.getInstance("yyyy-MM-dd");
|
||||
* </code>
|
||||
*
|
||||
* <p>This class can be used as a direct replacement to
|
||||
* {@code SimpleDateFormat} in most formatting situations.
|
||||
* This class is especially useful in multi-threaded server environments.
|
||||
|
|
Loading…
Reference in New Issue