@@ -161,12 +161,17 @@ public class DateUtils
161161 public static final int FORMAT_NO_YEAR = 0x00008 ;
162162 public static final int FORMAT_SHOW_DATE = 0x00010 ;
163163 public static final int FORMAT_NO_MONTH_DAY = 0x00020 ;
164+ @ Deprecated
164165 public static final int FORMAT_12HOUR = 0x00040 ;
166+ @ Deprecated
165167 public static final int FORMAT_24HOUR = 0x00080 ;
168+ @ Deprecated
166169 public static final int FORMAT_CAP_AMPM = 0x00100 ;
167170 public static final int FORMAT_NO_NOON = 0x00200 ;
171+ @ Deprecated
168172 public static final int FORMAT_CAP_NOON = 0x00400 ;
169173 public static final int FORMAT_NO_MIDNIGHT = 0x00800 ;
174+ @ Deprecated
170175 public static final int FORMAT_CAP_MIDNIGHT = 0x01000 ;
171176 /**
172177 * @deprecated Use
@@ -181,19 +186,25 @@ public class DateUtils
181186 public static final int FORMAT_NUMERIC_DATE = 0x20000 ;
182187 public static final int FORMAT_ABBREV_RELATIVE = 0x40000 ;
183188 public static final int FORMAT_ABBREV_ALL = 0x80000 ;
189+ @ Deprecated
184190 public static final int FORMAT_CAP_NOON_MIDNIGHT = (FORMAT_CAP_NOON | FORMAT_CAP_MIDNIGHT );
191+ @ Deprecated
185192 public static final int FORMAT_NO_NOON_MIDNIGHT = (FORMAT_NO_NOON | FORMAT_NO_MIDNIGHT );
186193
187194 // Date and time format strings that are constant and don't need to be
188195 // translated.
189196 /**
190197 * This is not actually the preferred 24-hour date format in all locales.
198+ * @deprecated use {@link java.text.SimpleDateFormat} instead.
191199 */
200+ @ Deprecated
192201 public static final String HOUR_MINUTE_24 = "%H:%M" ;
193202 public static final String MONTH_FORMAT = "%B" ;
194203 /**
195204 * This is not actually a useful month name in all locales.
205+ * @deprecated use {@link java.text.SimpleDateFormat} instead.
196206 */
207+ @ Deprecated
197208 public static final String ABBREV_MONTH_FORMAT = "%b" ;
198209 public static final String NUMERIC_MONTH_FORMAT = "%m" ;
199210 public static final String MONTH_DAY_FORMAT = "%-d" ;
@@ -207,6 +218,7 @@ public class DateUtils
207218 // The index is constructed from a bit-wise OR of the boolean values:
208219 // {showTime, showYear, showWeekDay}. For example, if showYear and
209220 // showWeekDay are both true, then the index would be 3.
221+ /** @deprecated do not use. */
210222 public static final int sameYearTable [] = {
211223 com .android .internal .R .string .same_year_md1_md2 ,
212224 com .android .internal .R .string .same_year_wday1_md1_wday2_md2 ,
@@ -233,6 +245,7 @@ public class DateUtils
233245 // The index is constructed from a bit-wise OR of the boolean values:
234246 // {showTime, showYear, showWeekDay}. For example, if showYear and
235247 // showWeekDay are both true, then the index would be 3.
248+ /** @deprecated do not use. */
236249 public static final int sameMonthTable [] = {
237250 com .android .internal .R .string .same_month_md1_md2 ,
238251 com .android .internal .R .string .same_month_wday1_md1_wday2_md2 ,
@@ -259,7 +272,9 @@ public class DateUtils
259272 *
260273 * @more <p>
261274 * e.g. "Sunday" or "January"
275+ * @deprecated use {@link java.text.SimpleDateFormat} instead.
262276 */
277+ @ Deprecated
263278 public static final int LENGTH_LONG = 10 ;
264279
265280 /**
@@ -268,7 +283,9 @@ public class DateUtils
268283 *
269284 * @more <p>
270285 * e.g. "Sun" or "Jan"
286+ * @deprecated use {@link java.text.SimpleDateFormat} instead.
271287 */
288+ @ Deprecated
272289 public static final int LENGTH_MEDIUM = 20 ;
273290
274291 /**
@@ -278,14 +295,18 @@ public class DateUtils
278295 * <p>e.g. "Su" or "Jan"
279296 * <p>In most languages, the results returned for LENGTH_SHORT will be the same as
280297 * the results returned for {@link #LENGTH_MEDIUM}.
298+ * @deprecated use {@link java.text.SimpleDateFormat} instead.
281299 */
300+ @ Deprecated
282301 public static final int LENGTH_SHORT = 30 ;
283302
284303 /**
285304 * Request an even shorter abbreviated version of the name.
286305 * Do not use this. Currently this will always return the same result
287306 * as {@link #LENGTH_SHORT}.
307+ * @deprecated use {@link java.text.SimpleDateFormat} instead.
288308 */
309+ @ Deprecated
289310 public static final int LENGTH_SHORTER = 40 ;
290311
291312 /**
@@ -295,7 +316,9 @@ public class DateUtils
295316 * <p>e.g. "S", "T", "T" or "J"
296317 * <p>In some languages, the results returned for LENGTH_SHORTEST will be the same as
297318 * the results returned for {@link #LENGTH_SHORT}.
319+ * @deprecated use {@link java.text.SimpleDateFormat} instead.
298320 */
321+ @ Deprecated
299322 public static final int LENGTH_SHORTEST = 50 ;
300323
301324 /**
@@ -309,7 +332,9 @@ public class DateUtils
309332 * Undefined lengths will return {@link #LENGTH_MEDIUM}
310333 * but may return something different in the future.
311334 * @throws IndexOutOfBoundsException if the dayOfWeek is out of bounds.
335+ * @deprecated use {@link java.text.SimpleDateFormat} instead.
312336 */
337+ @ Deprecated
313338 public static String getDayOfWeekString (int dayOfWeek , int abbrev ) {
314339 int [] list ;
315340 switch (abbrev ) {
@@ -330,7 +355,9 @@ public static String getDayOfWeekString(int dayOfWeek, int abbrev) {
330355 * @param ampm Either {@link Calendar#AM Calendar.AM} or {@link Calendar#PM Calendar.PM}.
331356 * @throws IndexOutOfBoundsException if the ampm is out of bounds.
332357 * @return Localized version of "AM" or "PM".
358+ * @deprecated use {@link java.text.SimpleDateFormat} instead.
333359 */
360+ @ Deprecated
334361 public static String getAMPMString (int ampm ) {
335362 Resources r = Resources .getSystem ();
336363 return r .getString (sAmPm [ampm - Calendar .AM ]);
@@ -345,7 +372,9 @@ public static String getAMPMString(int ampm) {
345372 * Undefined lengths will return {@link #LENGTH_MEDIUM}
346373 * but may return something different in the future.
347374 * @return Localized month of the year.
375+ * @deprecated use {@link java.text.SimpleDateFormat} instead.
348376 */
377+ @ Deprecated
349378 public static String getMonthString (int month , int abbrev ) {
350379 // Note that here we use sMonthsMedium for MEDIUM, SHORT and SHORTER.
351380 // This is a shortcut to not spam the translators with too many variations
@@ -378,7 +407,9 @@ public static String getMonthString(int month, int abbrev) {
378407 * but may return something different in the future.
379408 * @return Localized month of the year.
380409 * @hide Pending API council approval
410+ * @deprecated use {@link java.text.SimpleDateFormat} instead.
381411 */
412+ @ Deprecated
382413 public static String getStandaloneMonthString (int month , int abbrev ) {
383414 // Note that here we use sMonthsMedium for MEDIUM, SHORT and SHORTER.
384415 // This is a shortcut to not spam the translators with too many variations
0 commit comments