HomeSort by relevance Sort by last modified time
    Searched refs:DateUtils (Results 1 - 25 of 289) sorted by null

1 2 3 4 5 6 7 8 91011>>

  /packages/apps/Calendar/tests/src/com/android/calendar/
FormatDateRangeTest.java 21 import android.text.format.DateUtils;
28 * Unit tests for {@link android.text.format.DateUtils#formatDateRange}.
41 if ((flags & DateUtils.FORMAT_UTC) != 0) {
76 DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_ABBREV_ALL, "8am \u2013 11am"),
78 DateUtils.FORMAT_SHOW_TIME, "8:00AM \u2013 11:00AM"),
80 DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_24HOUR, "08:00 \u2013 17:00"),
82 DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_ABBREV_ALL, "8am \u2013 noon")
    [all...]
WeekNumberTest.java 22 import android.text.format.DateUtils;
212 int flags = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_NUMERIC_DATE;
213 String output = DateUtils.formatDateTime(mContext, millis, flags);
224 int flags = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_NUMERIC_DATE;
225 String output = DateUtils.formatDateTime(mContext, millis, flags);
  /frameworks/base/core/tests/coretests/src/android/text/format/
DateUtilsTest.java 27 assertEquals("0 seconds", DateUtils.formatDuration(0));
28 assertEquals("0 seconds", DateUtils.formatDuration(1));
29 assertEquals("0 seconds", DateUtils.formatDuration(499));
30 assertEquals("1 second", DateUtils.formatDuration(500));
31 assertEquals("1 second", DateUtils.formatDuration(1000));
32 assertEquals("2 seconds", DateUtils.formatDuration(1500));
38 assertEquals("59 seconds", DateUtils.formatDuration(59000));
39 assertEquals("60 seconds", DateUtils.formatDuration(59500));
40 assertEquals("1 minute", DateUtils.formatDuration(60000));
41 assertEquals("2 minutes", DateUtils.formatDuration(120000))
    [all...]
  /packages/apps/UnifiedEmail/src/com/android/mail/
FormattedDateBuilder.java 20 import android.text.format.DateUtils;
53 if (DateUtils.isToday(when)) {
54 return formatDateTime(when, DateUtils.FORMAT_SHOW_TIME);
56 return formatDateTime(when, DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_ABBREV_MONTH);
58 return formatDateTime(when, DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_NUMERIC_DATE);
75 if (DateUtils.isToday(when)) {
76 return formatDateTime(when, DateUtils.FORMAT_SHOW_TIME);
78 return getRelativeDateTimeString(mContext, when, DateUtils.DAY_IN_MILLIS
    [all...]
  /cts/tests/tests/text/src/android/text/format/cts/
DateUtilsTest.java 21 import android.text.format.DateUtils;
47 DateUtils.getDayOfWeekString(Calendar.SUNDAY, DateUtils.LENGTH_LONG));
49 DateUtils.getDayOfWeekString(Calendar.SUNDAY, DateUtils.LENGTH_MEDIUM));
51 DateUtils.getDayOfWeekString(Calendar.SUNDAY, DateUtils.LENGTH_SHORT));
53 DateUtils.getDayOfWeekString(Calendar.SUNDAY, DateUtils.LENGTH_SHORTER));
55 DateUtils.getDayOfWeekString(Calendar.SUNDAY, DateUtils.LENGTH_SHORTEST))
    [all...]
  /packages/apps/Messaging/src/com/android/messaging/util/
Dates.java 20 import android.text.format.DateUtils;
45 @VisibleForTesting public static final int FORCE_12_HOUR = DateUtils.FORMAT_12HOUR;
47 @VisibleForTesting public static final int FORCE_24_HOUR = DateUtils.FORMAT_24HOUR;
67 if (now - time < DateUtils.MINUTE_IN_MILLIS) {
72 // Workaround for b/5657035. The platform method {@link DateUtils#getRelativeTimeSpan()}
77 return DateUtils.getRelativeTimeSpanString(time, now, DateUtils.MINUTE_IN_MILLIS,
78 DateUtils.FORMAT_ABBREV_RELATIVE).toString();
132 if (!minPeriodToday && timeDiff < DateUtils.MINUTE_IN_MILLIS) {
134 } else if (!minPeriodToday && timeDiff < DateUtils.HOUR_IN_MILLIS)
    [all...]
  /packages/apps/ContactsCommon/tests/src/com/android/contacts/common/util/
DateUtilTests.java 25 * Unit tests for {@link com.android.contacts.common.util.DateUtils}.
36 long date2 = System.currentTimeMillis() + android.text.format.DateUtils.HOUR_IN_MILLIS;
37 assertEquals(0, DateUtils.getDayDifference(time, date1, date2));
38 assertEquals(0, DateUtils.getDayDifference(time, date2, date1));
47 long date2 = date1 + android.text.format.DateUtils.DAY_IN_MILLIS;
48 assertEquals(1, DateUtils.getDayDifference(time, date1, date2));
49 assertEquals(1, DateUtils.getDayDifference(time, date2, date1));
58 long date2 = date1 + 2*android.text.format.DateUtils.DAY_IN_MILLIS;
59 assertEquals(2, DateUtils.getDayDifference(time, date1, date2));
60 assertEquals(2, DateUtils.getDayDifference(time, date2, date1))
    [all...]
  /packages/apps/TV/tests/unit/src/com/android/tv/util/
UtilsTest_GetDurationString.java 20 import android.text.format.DateUtils;
29 * This test uses deprecated flags {@link DateUtils#FORMAT_12HOUR} and
30 * {@link DateUtils#FORMAT_24HOUR} to run this test independent to system's 12/24h format.
82 DateUtils.FORMAT_12HOUR));
85 DateUtils.FORMAT_24HOUR));
92 DateUtils.FORMAT_12HOUR));
96 DateUtils.FORMAT_24HOUR));
103 DateUtils.FORMAT_12HOUR));
107 DateUtils.FORMAT_24HOUR));
111 true, DateUtils.FORMAT_12HOUR))
    [all...]
  /frameworks/opt/datetimepicker/src/com/android/datetimepicker/date/
AccessibleDateAnimator.java 20 import android.text.format.DateUtils;
44 int flags = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_YEAR |
45 DateUtils.FORMAT_SHOW_WEEKDAY;
47 String dateString = DateUtils.formatDateTime(getContext(), mDateMillis, flags);
  /packages/apps/Calendar/tests/src/com/android/calendar/alerts/
MockAlarmManager.java 21 import android.text.format.DateUtils;
46 Assert.assertEquals("Alarm time not expected. Expected:" + DateUtils.formatDateTime(
47 context, expectedAlarmTime, DateUtils.FORMAT_SHOW_TIME) + ", actual:"
48 + DateUtils.formatDateTime(context, actualAlarmTime,
49 DateUtils.FORMAT_SHOW_TIME), expectedAlarmTime, actualAlarmTime);
AlarmSchedulerTest.java 31 import android.text.format.DateUtils;
176 long startMillis = currentMillis + DateUtils.HOUR_IN_MILLIS;
179 expectAlarmAt(startMillis - reminderMin * DateUtils.MINUTE_IN_MILLIS);
192 long currentMillis = startMillisLocal - DateUtils.DAY_IN_MILLIS;
195 expectAlarmAt(startMillisLocal - reminderMin * DateUtils.MINUTE_IN_MILLIS);
208 long currentMillis = startMillisLocal - DateUtils.DAY_IN_MILLIS;
211 expectAlarmAt(startMillisLocal - 15 * DateUtils.MINUTE_IN_MILLIS);
222 long startMillis = currentMillis + DateUtils.HOUR_IN_MILLIS;
236 long startMillis = currentMillis + DateUtils.DAY_IN_MILLIS * 3;
237 int reminderMin = (int) DateUtils.DAY_IN_MILLIS / (1000 * 60)
    [all...]
  /packages/apps/Calendar/src/com/android/calendar/
CalendarViewAdapter.java 23 import android.text.format.DateUtils;
322 DateUtils.formatDateRange(mContext, mFormatter, mMilliTime, mMilliTime,
323 DateUtils.FORMAT_SHOW_WEEKDAY, mTimeZone).toString());
326 DateUtils.formatDateRange(mContext, mFormatter, mMilliTime, mMilliTime,
327 DateUtils.FORMAT_SHOW_WEEKDAY, mTimeZone).toString());
330 DateUtils.formatDateRange(mContext, mFormatter, mMilliTime, mMilliTime,
331 DateUtils.FORMAT_SHOW_WEEKDAY, mTimeZone).toString());
333 dayOfWeek = DateUtils.formatDateRange(mContext, mFormatter, mMilliTime, mMilliTime,
334 DateUtils.FORMAT_SHOW_WEEKDAY, mTimeZone).toString();
347 String date = DateUtils.formatDateRange(mContext, mFormatter, mMilliTime, mMilliTime
    [all...]
  /frameworks/base/packages/DocumentsUI/src/com/android/documentsui/
Shared.java 26 import android.text.format.DateUtils;
128 // TODO: DateUtils should make this easier
134 int flags = DateUtils.FORMAT_NO_NOON | DateUtils.FORMAT_NO_MIDNIGHT
135 | DateUtils.FORMAT_ABBREV_ALL;
138 flags |= DateUtils.FORMAT_SHOW_YEAR | DateUtils.FORMAT_SHOW_DATE;
140 flags |= DateUtils.FORMAT_SHOW_DATE;
142 flags |= DateUtils.FORMAT_SHOW_TIME;
145 return DateUtils.formatDateTime(context, when, flags)
    [all...]
  /frameworks/base/core/tests/coretests/src/android/text/method/
KeyListenerTestCase.java 21 import android.text.format.DateUtils;
54 assertTrue(mActivity.waitForWindowFocus(5 * DateUtils.SECOND_IN_MILLIS));
  /frameworks/base/tests/LocationTracker/src/com/android/locationtracker/data/
DateUtils.java 25 public class DateUtils {
27 private DateUtils() {
  /packages/apps/StorageManager/src/com/android/storagemanager/automatic/
AutomaticStorageBroadcastReceiver.java 26 import android.text.format.DateUtils;
35 private static final long PERIOD = DateUtils.DAY_IN_MILLIS;
  /frameworks/support/v7/appcompat/src/android/support/v7/app/
TwilightCalculator.java 19 import android.text.format.DateUtils;
86 final float daysSince2000 = (float) (time - UTC_2000) / DateUtils.DAY_IN_MILLIS;
127 sunset = Math.round((solarTransitJ2000 + hourAngle) * DateUtils.DAY_IN_MILLIS) + UTC_2000;
128 sunrise = Math.round((solarTransitJ2000 - hourAngle) * DateUtils.DAY_IN_MILLIS) + UTC_2000;
  /packages/apps/Contacts/src/com/android/contacts/interactions/
ContactInteractionUtil.java 21 import android.text.format.DateUtils;
90 return DateUtils.formatDateTime(context, interactionCalendar.getTimeInMillis(),
91 DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_NO_YEAR);
CalendarInteractionUtils.java 8 import android.text.format.DateUtils;
32 int flagsDate = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_WEEKDAY;
33 int flagsTime = DateUtils.FORMAT_SHOW_TIME;
35 flagsTime |= DateUtils.FORMAT_24HOUR;
60 datetimeString = DateUtils.formatDateRange(context, f, startMillis,
90 int flagsDatetime = flagsDate | flagsTime | DateUtils.FORMAT_ABBREV_MONTH |
91 DateUtils.FORMAT_ABBREV_WEEKDAY;
166 * If the {@link DateUtils#FORMAT_UTC} flag is used it will pass in
173 * {@link DateUtils#formatDateRange(Context, Formatter, long, long, int, String) formatDateRange
    [all...]
  /packages/apps/StorageManager/src/com/android/storagemanager/deletionhelper/
DownloadsFilePreference.java 21 import android.text.format.DateUtils;
43 DateUtils.formatDateTime(context,
44 mFile.lastModified(),DateUtils.FORMAT_SHOW_DATE)));
  /packages/apps/Dialer/src/com/android/dialer/calllog/
CallDetailHistoryAdapter.java 21 import android.text.format.DateUtils;
116 CharSequence dateValue = DateUtils.formatDateRange(mContext, details.date, details.date,
117 DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE |
118 DateUtils.FORMAT_SHOW_WEEKDAY | DateUtils.FORMAT_SHOW_YEAR);
PhoneCallDetailsHelper.java 30 import android.text.format.DateUtils;
244 return DateUtils.getRelativeTimeSpanString(details.date, getCurrentTimeMillis(),
245 DateUtils.MINUTE_IN_MILLIS, DateUtils.FORMAT_ABBREV_RELATIVE);
264 DateUtils.formatDateTime(mContext, details.date, DateUtils.FORMAT_SHOW_TIME));
271 if (DateUtils.isToday(date)) {
274 return DateUtils.formatDateTime(mContext, date, DateUtils.FORMAT_SHOW_DATE
275 | DateUtils.FORMAT_ABBREV_MONT
    [all...]
  /development/apps/BuildWidget/src/com/android/buildwidget/
BuildWidget.java 29 import android.text.format.DateUtils;
75 DateUtils.formatDateTime(context, android.os.Build.TIME,
76 DateUtils.FORMAT_NUMERIC_DATE));
  /external/apache-http/src/org/apache/http/impl/cookie/
BasicExpiresHandler.java 64 cookie.setExpiryDate(DateUtils.parseDate(value, this.datepatterns));
  /frameworks/opt/timezonepicker/src/com/android/timezonepicker/
TimeZoneInfo.java 22 import android.text.format.DateUtils;
130 final long nowMinute = System.currentTimeMillis() / DateUtils.MINUTE_IN_MILLIS;
131 final long now = nowMinute * DateUtils.MINUTE_IN_MILLIS;
137 cacheKey = (int) (gmtOffset + 36 * DateUtils.HOUR_IN_MILLIS);
139 cacheKey = (int) (gmtOffset - 36 * DateUtils.HOUR_IN_MILLIS);
152 int flags = DateUtils.FORMAT_ABBREV_ALL;
153 flags |= DateUtils.FORMAT_SHOW_TIME;
155 flags |= DateUtils.FORMAT_24HOUR;
159 DateUtils.formatDateRange(context, mFormatter, now, now, flags, mTzId);

Completed in 619 milliseconds

1 2 3 4 5 6 7 8 91011>>