diff -r 69648476a89e -r a64012cb49d6 jdk/src/share/classes/java/text/DateFormat.java
--- a/jdk/src/share/classes/java/text/DateFormat.java Thu Jul 25 20:03:20 2013 -0700
+++ b/jdk/src/share/classes/java/text/DateFormat.java Fri Jul 26 17:22:08 2013 +0900
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -57,7 +57,7 @@
* {@code DateFormat} is an abstract class for date/time formatting subclasses which
* formats and parses dates or time in a language-independent manner.
* The date/time formatting subclass, such as {@link SimpleDateFormat}, allows for
- * formatting (i.e., date -> text), parsing (text -> date), and
+ * formatting (i.e., date → text), parsing (text → date), and
* normalization. The date is represented as a Date
object or
* as the milliseconds since January 1, 1970, 00:00:00 GMT.
*
@@ -73,28 +73,36 @@
*
*
To format a date for the current Locale, use one of the * static factory methods: - *
- * myString = DateFormat.getDateInstance().format(myDate); - *+ *
+ **{@code + * myString = DateFormat.getDateInstance().format(myDate); + * }+ *
If you are formatting multiple dates, it is * more efficient to get the format and use it multiple times so that * the system doesn't have to fetch the information about the local * language and country conventions multiple times. - *
- * DateFormat df = DateFormat.getDateInstance(); - * for (int i = 0; i < myDate.length; ++i) { - * output.println(df.format(myDate[i]) + "; "); - * } - *+ *
+ **{@code + * DateFormat df = DateFormat.getDateInstance(); + * for (int i = 0; i < myDate.length; ++i) { + * output.println(df.format(myDate[i]) + "; "); + * } + * }+ *
To format a date for a different Locale, specify it in the * call to {@link #getDateInstance(int, Locale) getDateInstance()}. - *
- * DateFormat df = DateFormat.getDateInstance(DateFormat.LONG, Locale.FRANCE); - *+ *
+ **{@code + * DateFormat df = DateFormat.getDateInstance(DateFormat.LONG, Locale.FRANCE); + * }+ *
You can use a DateFormat to parse also. - *
- * myDate = df.parse(myString); - *+ *
+ **{@code + * myDate = df.parse(myString); + * }+ *
Use {@code getDateInstance} to get the normal date format for that country. * There are other static factory methods available. * Use {@code getTimeInstance} to get the time format for that country. @@ -125,7 +133,7 @@ * on the screen. * * - *
* Date formats are not synchronized. @@ -581,6 +589,8 @@ /** * Get a default date/time formatter that uses the SHORT style for both the * date and the time. + * + * @return a date/time formatter */ public final static DateFormat getInstance() { return getDateTimeInstance(SHORT, SHORT); @@ -653,9 +663,9 @@ /** * Sets the time zone for the calendar of this {@code DateFormat} object. * This method is equivalent to the following call. - *
+ *- * getCalendar().setTimeZone(zone) - *
* *{@code + * getCalendar().setTimeZone(zone) + * }
The {@code TimeZone} set by this method is overwritten by a * {@link #setCalendar(java.util.Calendar) setCalendar} call. @@ -673,9 +683,9 @@ /** * Gets the time zone. * This method is equivalent to the following call. - *
+ *- * getCalendar().getTimeZone() - *
* * @return the time zone associated with the calendar of DateFormat. */ @@ -691,9 +701,9 @@ * inputs must match this object's format. * *{@code + * getCalendar().getTimeZone() + * }
This method is equivalent to the following call. - *
+ *- * getCalendar().setLenient(lenient) - *
* *{@code + * getCalendar().setLenient(lenient) + * }
This leniency value is overwritten by a call to {@link * #setCalendar(java.util.Calendar) setCalendar()}. @@ -709,9 +719,9 @@ /** * Tell whether date/time parsing is to be lenient. * This method is equivalent to the following call. - *
+ *- * getCalendar().isLenient() - *
* * @return {@code true} if the {@link #calendar} is lenient; * {@code false} otherwise.{@code + * getCalendar().isLenient() + * }