Lines Matching refs:time

39  * elapsed time and date ranges, strings for days of the week and months, and AM/PM text etc.
96 // Date and time format strings that are constant and don't need to be
246 * Returns a string describing the elapsed time since startTime.
249 * @param startTime some time in the past.
250 * @return a String object containing the elapsed time.
258 * Returns a string describing 'time' as a time relative to 'now'.
263 * @param time the time to describe, in milliseconds
264 * @param now the current time in milliseconds
265 * @param minResolution the minimum timespan to report. For example, a time 3 seconds in the
269 public static CharSequence getRelativeTimeSpanString(long time, long now, long minResolution) {
271 return getRelativeTimeSpanString(time, now, minResolution, flags);
275 * Returns a string describing 'time' as a time relative to 'now'.
283 * @param time the time to describe, in milliseconds
284 * @param now the current time in milliseconds
285 * @param minResolution the minimum timespan to report. For example, a time
294 public static CharSequence getRelativeTimeSpanString(long time, long now, long minResolution,
297 TimeZone.getDefault(), time, now, minResolution, flags);
301 * Return string describing the elapsed time since startTime formatted like
302 * "[relative time/date], [time]".
312 * @param time some time in the past.
313 * @param minResolution the minimum elapsed time (in milliseconds) to report
314 * when showing relative times. For example, a time 3 seconds in
317 * @param transitionResolution the elapsed time (in milliseconds) at which
323 public static CharSequence getRelativeDateTimeString(Context c, long time, long minResolution,
331 TimeZone.getDefault(), time, System.currentTimeMillis(), minResolution,
353 * minutes" or "1 second". Returns only largest meaningful unit of time,
376 * Formats an elapsed time in the form "MM:SS" or "H:MM:SS"
378 * @param elapsedSeconds the elapsed time in seconds.
385 * Formats an elapsed time in a format like "MM:SS" or "H:MM:SS" (using a form
390 * @param elapsedSeconds the elapsed time in seconds.
416 // Format the broken-down time in a locale-appropriate way.
428 * Format a date / time such that if the then is on the same day as now, it shows
429 * just the time and if it's a different day, it shows just the date.
440 * @param now the base time
442 * @param timeStyle how to format the time portion.
468 Time time = new Time();
469 time.set(when);
471 int thenYear = time.year;
472 int thenMonth = time.month;
473 int thenMonthDay = time.monthDay;
475 time.set(System.currentTimeMillis());
476 return (thenYear == time.year)
477 && (thenMonth == time.month)
478 && (thenMonthDay == time.monthDay);
482 * Formats a date or a time range according to the local conventions.
486 * somewhat costly in terms of memory and time. This is probably acceptable
493 * @param context the context is required only if the time is shown
494 * @param startMillis the start time in UTC milliseconds
495 * @param endMillis the end time in UTC milliseconds
498 * @return a string containing the formatted date/time range.
507 * Formats a date or a time range according to the local conventions.
510 * time range in the local time zone. If you want to specify the time
514 * @param context the context is required only if the time is shown
518 * @param startMillis the start time in UTC milliseconds
519 * @param endMillis the end time in UTC milliseconds
522 * @return a string containing the formatted date/time range.
530 * Formats a date or a time range according to the local conventions.
578 * If FORMAT_SHOW_TIME is set, the time is shown as part of the date range.
579 * If the start and end time are the same, then just the start time is
602 * If FORMAT_CAP_AMPM is set and 12-hour time is used, then the "AM"
608 * If FORMAT_NO_NOON is set and 12-hour time is used, then "12pm" is
612 * If FORMAT_CAP_NOON is set and 12-hour time is used, then "Noon" is
618 * If FORMAT_NO_MIDNIGHT is set and 12-hour time is used, then "12am" is
622 * If FORMAT_CAP_MIDNIGHT is set and 12-hour time is used, then "Midnight"
628 * If FORMAT_12HOUR is set and the time is shown, then the time is
629 * shown in the 12-hour time format. You should not normally set this.
630 * Instead, let the time format be chosen automatically according to the
635 * If FORMAT_24HOUR is set and the time is shown, then the time is
636 * shown in the 24-hour time format. You should not normally set this.
637 * Instead, let the time format be chosen automatically according to the
642 * If FORMAT_UTC is set, then the UTC time zone is used for the start
643 * and end milliseconds unless a time zone is specified. If a time zone
647 * If FORMAT_ABBREV_TIME is set and 12-hour time format is used, then the
649 * if they are zero. For example, instead of "3:00pm" the time would be
675 * <li>When the time is not displayed. This results in "Nov 10 - 11" for
680 * @param context the context is required only if the time is shown
684 * @param startMillis the start time in UTC milliseconds
685 * @param endMillis the end time in UTC milliseconds
687 * @param timeZone the time zone to compute the string in. Use null for local
690 * @return the formatter with the formatted date/time range appended to the string buffer.
694 // If we're being asked to format a time without being explicitly told whether to use
711 * Formats a date or a time according to the local conventions. There are
713 * time is shown, if the day of the week is shown, if the month name is
747 * @param context the context is required only if the time is shown
748 * @param millis a point in time in UTC milliseconds
750 * @return a string containing the formatted date/time.
757 * @return a relative time string to display the time expressed by millis. Times
759 * time is March 31st, 0:30:
817 * Convenience function to return relative time string without preposition.
819 * @param millis time in milliseconds
820 * @return {@link CharSequence} containing relative time.