Lines Matching defs:format

17 package android.text.format;
38 Most callers should avoid supplying their own format strings to this
39 class' {@code format} methods and rely on the correctly localized ones
43 of format strings, see {@link java.text.SimpleDateFormat}.
46 The format methods in this class takes as inputs a format string and a representation of a date/time.
47 The format string controls how the output is generated.
51 of that field. For instance, the format character 'M' is used to
87 Text in the format string that should be copied verbatim rather that
133 This designator indicates the hour of the day in 12 hour format.
142 This designator indicates the hour of the day in 24 hour format.
176 necessary in some format strings in some languages. For
216 * Returns true if user preference is set to 24-hour format.
218 * @return true if 24 hour time format is selected, false otherwise.
262 * Returns a {@link java.text.DateFormat} object that can format the time according
281 * Returns a {@link java.text.DateFormat} object that can format the date
295 * Returns a {@link java.text.DateFormat} object to format the date
296 * as if the date format setting were set to <code>value</code>,
297 * including null to use the locale's default format.
299 * @param value the date format setting string to interpret for
305 String format = getDateFormatStringForSetting(context, value);
307 return new java.text.SimpleDateFormat(format);
320 value = String.format(template, "yyyy", "MM", "dd");
322 value = String.format(template, "yyyy", "dd", "MM");
326 value = String.format(template, "MM", "dd", "yyyy");
328 value = String.format(template, "MM", "yyyy", "dd");
332 value = String.format(template, "dd", "MM", "yyyy");
334 value = String.format(template, "dd", "yyyy", "MM");
352 * Returns a {@link java.text.DateFormat} object that can format the date
362 * Returns a {@link java.text.DateFormat} object that can format the date
372 * Gets the current date format stored as a char array. The array will contain
374 * specified by the user's format preference. Note that this order is
418 * Given a format string and a time in milliseconds since Jan 1, 1970 GMT, returns a
420 * @param inFormat the format string, as described in {@link android.text.format.DateFormat}
424 public static CharSequence format(CharSequence inFormat, long inTimeInMillis) {
425 return format(inFormat, new Date(inTimeInMillis));
429 * Given a format string and a {@link java.util.Date} object, returns a CharSequence containing
431 * @param inFormat the format string, as described in {@link android.text.format.DateFormat}
432 * @param inDate the date to format
435 public static CharSequence format(CharSequence inFormat, Date inDate) {
440 return format(inFormat, c);
444 * Indicates whether the specified format string contains seconds.
446 * Always returns false if the input format is null.
448 * @param inFormat the format string, as described in {@link android.text.format.DateFormat}
450 * @return true if the format string contains {@link #SECONDS}, false otherwise
506 * Given a format string and a {@link java.util.Calendar} object, returns a CharSequence
508 * @param inFormat the format string, as described in {@link android.text.format.DateFormat}
509 * @param inDate the date to format
512 public static CharSequence format(CharSequence inFormat, Calendar inDate) {
664 : String.format(Locale.getDefault(), "%d", year);
705 return String.format(Locale.getDefault(), "%0" + inMinDigits + "d", inValue);