/packages/apps/Calendar/tests/src/com/android/calendar/ |
D | FormatDateRangeTest.java | 21 import android.text.format.DateUtils; 41 if ((flags & DateUtils.FORMAT_UTC) != 0) { in DateTest() 76 DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_ABBREV_ALL, "8 \u2013 11 AM"), 78 DateUtils.FORMAT_SHOW_TIME, "8:00 \u2013 11:00 AM"), 80 DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_24HOUR, "08:00 \u2013 17:00"), 82 DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_ABBREV_ALL, "8 AM \u2013 12 PM"), 84 … DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_NO_NOON | DateUtils.FORMAT_ABBREV_ALL, 87 … DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_CAP_NOON | DateUtils.FORMAT_ABBREV_ALL, 90 … DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_ABBREV_ALL, "10:30 AM \u2013 1:00 PM"), 92 DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_ABBREV_ALL, "1 \u2013 2 PM"), [all …]
|
D | WeekNumberTest.java | 22 import android.text.format.DateUtils; 212 int flags = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_NUMERIC_DATE; in testAll() 213 String output = DateUtils.formatDateTime(mContext, millis, flags); in testAll() 224 int flags = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_NUMERIC_DATE; in testAll() 225 String output = DateUtils.formatDateTime(mContext, millis, flags); in testAll()
|
/packages/apps/UnifiedEmail/src/com/android/mail/ |
D | FormattedDateBuilder.java | 20 import android.text.format.DateUtils; 53 if (DateUtils.isToday(when)) { in formatShortDateTime() 54 return formatDateTime(when, DateUtils.FORMAT_SHOW_TIME); in formatShortDateTime() 56 return formatDateTime(when, DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_ABBREV_MONTH); in formatShortDateTime() 58 return formatDateTime(when, DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_NUMERIC_DATE); in formatShortDateTime() 75 if (DateUtils.isToday(when)) { in formatLongDateTime() 76 return formatDateTime(when, DateUtils.FORMAT_SHOW_TIME); in formatLongDateTime() 78 return getRelativeDateTimeString(mContext, when, DateUtils.DAY_IN_MILLIS, in formatLongDateTime() 79 2 * DateUtils.WEEK_IN_MILLIS, in formatLongDateTime() 80 DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_ABBREV_MONTH); in formatLongDateTime() [all …]
|
/packages/apps/Messaging/src/com/android/messaging/util/ |
D | 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) { in getRelativeTimeSpanString() 77 return DateUtils.getRelativeTimeSpanString(time, now, DateUtils.MINUTE_IN_MILLIS, in getRelativeTimeSpanString() 78 DateUtils.FORMAT_ABBREV_RELATIVE).toString(); in getRelativeTimeSpanString() 132 if (!minPeriodToday && timeDiff < DateUtils.MINUTE_IN_MILLIS) { in getTimestamp() 134 } else if (!minPeriodToday && timeDiff < DateUtils.HOUR_IN_MILLIS) { in getTimestamp() 138 } else if (timeDiff < DateUtils.WEEK_IN_MILLIS) { in getTimestamp() 140 } else if (timeDiff < DateUtils.YEAR_IN_MILLIS) { in getTimestamp() [all …]
|
/packages/apps/Calendar/src/com/android/calendar/ |
D | CalendarViewAdapter.java | 23 import android.text.format.DateUtils; 308 DateUtils.formatDateRange(mContext, mFormatter, mMilliTime, mMilliTime, in buildDayOfWeek() 309 DateUtils.FORMAT_SHOW_WEEKDAY, mTimeZone).toString()); in buildDayOfWeek() 312 DateUtils.formatDateRange(mContext, mFormatter, mMilliTime, mMilliTime, in buildDayOfWeek() 313 DateUtils.FORMAT_SHOW_WEEKDAY, mTimeZone).toString()); in buildDayOfWeek() 316 DateUtils.formatDateRange(mContext, mFormatter, mMilliTime, mMilliTime, in buildDayOfWeek() 317 DateUtils.FORMAT_SHOW_WEEKDAY, mTimeZone).toString()); in buildDayOfWeek() 319 dayOfWeek = DateUtils.formatDateRange(mContext, mFormatter, mMilliTime, mMilliTime, in buildDayOfWeek() 320 DateUtils.FORMAT_SHOW_WEEKDAY, mTimeZone).toString(); in buildDayOfWeek() 333 String date = DateUtils.formatDateRange(mContext, mFormatter, mMilliTime, mMilliTime, in buildFullDate() [all …]
|
/packages/apps/Dialer/java/com/android/dialer/calllogutils/ |
D | CallLogDates.java | 22 import android.text.format.DateUtils; 57 ? DateUtils.getRelativeTimeSpanString( in newCallLogTimestampLabel() 60 DateUtils.MINUTE_IN_MILLIS, in newCallLogTimestampLabel() 61 DateUtils.FORMAT_ABBREV_RELATIVE) in newCallLogTimestampLabel() 67 : DateUtils.getRelativeTimeSpanString( in newCallLogTimestampLabel() 68 timestampMillis, nowMillis, DateUtils.MINUTE_IN_MILLIS); in newCallLogTimestampLabel() 75 return DateUtils.formatDateTime(context, timestampMillis, DateUtils.FORMAT_SHOW_TIME); in newCallLogTimestampLabel() 105 DateUtils.formatDateTime( in formatDate() 108 DateUtils.FORMAT_SHOW_TIME in formatDate() 109 | DateUtils.FORMAT_SHOW_DATE in formatDate() [all …]
|
/packages/apps/DocumentsUI/src/com/android/documentsui/util/ |
D | FormatUtils.java | 23 import android.text.format.DateUtils; 46 if (millis >= DateUtils.HOUR_IN_MILLIS) { in formatDuration() 48 (int) ((millis + DateUtils.HOUR_IN_MILLIS / 2) / DateUtils.HOUR_IN_MILLIS); in formatDuration() 50 } else if (millis >= DateUtils.MINUTE_IN_MILLIS) { in formatDuration() 52 (int) ((millis + DateUtils.MINUTE_IN_MILLIS / 2) / DateUtils.MINUTE_IN_MILLIS); in formatDuration() 56 (int) ((millis + DateUtils.SECOND_IN_MILLIS / 2) / DateUtils.SECOND_IN_MILLIS); in formatDuration()
|
/packages/apps/Gallery2/src/com/android/gallery3d/data/ |
D | TimeClustering.java | 21 import android.text.format.DateUtils; 404 caption = DateUtils.formatDateRange(context, minTimestamp, in generateCaption() 405 maxTimestamp, DateUtils.FORMAT_ABBREV_ALL); in generateCaption() 411 int flags = DateUtils.FORMAT_ABBREV_MONTH | DateUtils.FORMAT_SHOW_DATE; in generateCaption() 414 String dateRangeWithOptionalYear = DateUtils.formatDateTime( in generateCaption() 416 String dateRangeWithYear = DateUtils.formatDateTime( in generateCaption() 417 context, minTimestamp, flags | DateUtils.FORMAT_SHOW_YEAR); in generateCaption() 424 caption = DateUtils.formatDateRange(context, midTimestamp, in generateCaption() 425 midTimestamp, DateUtils.FORMAT_SHOW_TIME | flags); in generateCaption() 431 int flags = DateUtils.FORMAT_NO_MONTH_DAY in generateCaption() [all …]
|
/packages/apps/DocumentsUI/src/com/android/documentsui/base/ |
D | Shared.java | 33 import android.text.format.DateUtils; 157 int flags = DateUtils.FORMAT_NO_NOON | DateUtils.FORMAT_NO_MIDNIGHT in formatTime() 158 | DateUtils.FORMAT_ABBREV_ALL; in formatTime() 161 flags |= DateUtils.FORMAT_SHOW_YEAR | DateUtils.FORMAT_SHOW_DATE; in formatTime() 163 flags |= DateUtils.FORMAT_SHOW_DATE; in formatTime() 165 flags |= DateUtils.FORMAT_SHOW_TIME; in formatTime() 168 return DateUtils.formatDateTime(context, when, flags); in formatTime()
|
/packages/apps/Calendar/tests/src/com/android/calendar/widget/ |
D | CalendarAppWidgetServiceTest.java | 29 import android.text.format.DateUtils; 115 DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_ABBREV_ALL); in testGetAppWidgetModel_1Event() 142 DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_ABBREV_ALL); in testGetAppWidgetModel_AllDayEventLater() 163 eventInfo.when = DateUtils.formatDateTime(context, end, in testGetAppWidgetModel_AllDayEventLater() 164 DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_ABBREV_ALL); in testGetAppWidgetModel_AllDayEventLater()
|
/packages/apps/DeskClock/src/com/android/deskclock/stopwatch/ |
D | LapsAdapter.java | 22 import android.text.format.DateUtils; 43 private static final long TEN_MINUTES = 10 * DateUtils.MINUTE_IN_MILLIS; 44 private static final long HOUR = DateUtils.HOUR_IN_MILLIS; 247 hours = (int) (time / DateUtils.HOUR_IN_MILLIS); in formatTime() 248 int remainder = (int) (time % DateUtils.HOUR_IN_MILLIS); in formatTime() 250 minutes = (int) (remainder / DateUtils.MINUTE_IN_MILLIS); in formatTime() 251 remainder = (int) (remainder % DateUtils.MINUTE_IN_MILLIS); in formatTime() 253 seconds = (int) (remainder / DateUtils.SECOND_IN_MILLIS); in formatTime() 254 remainder = (int) (remainder % DateUtils.SECOND_IN_MILLIS); in formatTime()
|
/packages/providers/CalendarProvider/src/com/android/providers/calendar/ |
D | CalendarAlarmManager.java | 40 import android.text.format.DateUtils; 92 private static final long SCHEDULE_ALARM_SLACK = 2 * DateUtils.HOUR_IN_MILLIS; 102 private static final long CLEAR_OLD_ALARM_THRESHOLD = 7 * DateUtils.DAY_IN_MILLIS 110 static final long NEXT_ALARM_CHECK_TIME_MS = DateUtils.DAY_IN_MILLIS - 111 (15 * DateUtils.MINUTE_IN_MILLIS); 258 final long end = currentMillis + DateUtils.DAY_IN_MILLIS; in scheduleNextAlarmLocked() 315 String subQuerySuffix = " -(" + Reminders.MINUTES + "*" + +DateUtils.MINUTE_IN_MILLIS + ")" in scheduleNextAlarmLocked() 355 start - DateUtils.DAY_IN_MILLIS, end + DateUtils.DAY_IN_MILLIS, false /* in scheduleNextAlarmLocked() 408 } else if (alarmTime > nextAlarmTime + DateUtils.MINUTE_IN_MILLIS) { in scheduleNextAlarmLocked()
|
/packages/apps/Dialer/java/com/android/dialer/app/calllog/ |
D | PhoneCallDetailsHelper.java | 34 import android.text.format.DateUtils; 517 return DateUtils.getRelativeTimeSpanString( in getCallDate() 520 DateUtils.MINUTE_IN_MILLIS, in getCallDate() 521 DateUtils.FORMAT_ABBREV_RELATIVE); in getCallDate() 540 DateUtils.formatDateTime(context, details.date, DateUtils.FORMAT_SHOW_TIME)); in getGranularDateTime() 547 if (DateUtils.isToday(date)) { in getGranularDate() 550 return DateUtils.formatDateTime( in getGranularDate() 553 DateUtils.FORMAT_SHOW_DATE in getGranularDate() 554 | DateUtils.FORMAT_ABBREV_MONTH in getGranularDate() 555 | (shouldShowYear(date) ? DateUtils.FORMAT_SHOW_YEAR : DateUtils.FORMAT_NO_YEAR)); in getGranularDate()
|
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/ |
D | CalendarSanityCheckerTest.java | 20 import android.text.format.DateUtils; 80 mInjectedRealtimeMillis += DateUtils.DAY_IN_MILLIS - (15 * DateUtils.MINUTE_IN_MILLIS); in testWithLastCheckTime() 94 mInjectedRealtimeMillis += DateUtils.DAY_IN_MILLIS - (15 * DateUtils.MINUTE_IN_MILLIS); in testWithLastCheckTime()
|
D | CalendarProvider2Test.java | 50 import android.text.format.DateUtils; 449 int flags = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_NUMERIC_DATE | in execute() 450 DateUtils.FORMAT_24HOUR; in execute() 452 flags |= DateUtils.FORMAT_UTC; in execute() 454 flags |= DateUtils.FORMAT_SHOW_TIME; in execute() 456 String date = DateUtils.formatDateRange(mContext, begin, begin, flags); in execute() 515 int flags = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_NUMERIC_DATE; in execute() 517 flags |= DateUtils.FORMAT_UTC; in execute() 519 flags |= DateUtils.FORMAT_SHOW_TIME; in execute() 521 String date = DateUtils.formatDateRange(mContext, instance, instance, flags); in execute() [all …]
|
/packages/apps/Calendar/src/com/android/calendar/widget/ |
D | CalendarAppWidgetModel.java | 26 import android.text.format.DateUtils; 361 int flags = DateUtils.FORMAT_ABBREV_ALL; in populateEventInfo() 364 flags |= DateUtils.FORMAT_SHOW_DATE; in populateEventInfo() 367 flags |= DateUtils.FORMAT_SHOW_TIME; in populateEventInfo() 369 flags |= DateUtils.FORMAT_24HOUR; in populateEventInfo() 372 flags |= DateUtils.FORMAT_SHOW_DATE; in populateEventInfo() 409 int flags = DateUtils.FORMAT_ABBREV_ALL | DateUtils.FORMAT_SHOW_DATE; in populateDayInfo() 416 flags |= DateUtils.FORMAT_SHOW_WEEKDAY; in populateDayInfo()
|
D | CalendarAppWidgetProvider.java | 32 import android.text.format.DateUtils; 137 final String dayOfWeek = DateUtils.getDayOfWeekString(time.weekDay + 1, in performUpdate() 138 DateUtils.LENGTH_MEDIUM); in performUpdate() 140 DateUtils.FORMAT_ABBREV_ALL | DateUtils.FORMAT_SHOW_DATE in performUpdate() 141 | DateUtils.FORMAT_NO_YEAR); in performUpdate()
|
/packages/apps/Contacts/src/com/android/contacts/editor/ |
D | EventFieldEditorView.java | 39 import com.android.contacts.util.DateUtils; 123 String data = DateUtils.formatDate(getContext(), getEntry().getAsString(column), in rebuildDateView() 166 final Calendar calendar = Calendar.getInstance(DateUtils.UTC_TIMEZONE, Locale.US); in onLabelRebuilt() 202 final Calendar calendar = Calendar.getInstance(DateUtils.UTC_TIMEZONE, Locale.US); in createDatePickerDialog() 217 Calendar cal = DateUtils.parseDate(oldValue, false); in createDatePickerDialog() 219 if (DateUtils.isYearSet(cal)) { in createDatePickerDialog() 236 Calendar.getInstance(DateUtils.UTC_TIMEZONE, Locale.US); in createDatePickerDialog()
|
/packages/apps/Dialer/java/com/android/dialer/rtt/ |
D | RttTranscriptMessageViewHolder.java | 22 import android.text.format.DateUtils; 88 return DateUtils.formatDateTime( in getTimestampText() 92 ? DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_TIME in getTimestampText() 93 : DateUtils.FORMAT_SHOW_TIME); in getTimestampText()
|
/packages/apps/Settings/src/com/android/settings/enterprise/ |
D | AdminActionPreferenceControllerBase.java | 18 import android.text.format.DateUtils; 47 DateUtils.formatDateTime(mContext, timestamp.getTime(), in updateState() 48 DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE)); in updateState()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/enterprise/ |
D | AdminActionPreferenceControllerBase.java | 18 import android.text.format.DateUtils; 47 DateUtils.formatDateTime(mContext, timestamp.getTime(), in updateState() 48 DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE)); in updateState()
|
/packages/apps/SettingsIntelligence/src/com/android/settings/intelligence/suggestions/model/ |
D | SuggestionCategoryRegistry.java | 20 import android.text.format.DateUtils; 45 true /* exclusive */, 14 * DateUtils.DAY_IN_MILLIS)); in buildCategory() 47 true /* exclusive */, 3 * DateUtils.DAY_IN_MILLIS)); in buildCategory() 49 true /* exclusive */, 14 * DateUtils.DAY_IN_MILLIS)); in buildCategory()
|
/packages/apps/TV/src/com/android/tv/util/ |
D | Utils.java | 39 import android.text.format.DateUtils; 432 DateUtils.FORMAT_ABBREV_MONTH in getDurationString() 433 | ((useShortFormat) ? DateUtils.FORMAT_NUMERIC_DATE : 0); in getDurationString() 436 flags |= DateUtils.FORMAT_SHOW_TIME; in getDurationString() 439 flags |= DateUtils.FORMAT_SHOW_DATE; in getDurationString() 441 if (!showDate || (flags & DateUtils.FORMAT_SHOW_YEAR) == 0) { in getDurationString() 443 flags |= DateUtils.FORMAT_NO_YEAR; in getDurationString() 454 return DateUtils.formatDateRange( in getDurationString() 460 String dateRange = DateUtils.formatDateRange(context, startUtcMillis, endUtcMillis, flags); in getDurationString() 463 : DateUtils.formatDateRange(context, startUtcMillis, endUtcMillis + 1, flags); in getDurationString() [all …]
|
/packages/apps/Calendar/src/com/android/calendar/alerts/ |
D | AlarmScheduler.java | 31 import android.text.format.DateUtils; 92 private static final long EVENT_LOOKAHEAD_WINDOW_MS = DateUtils.WEEK_IN_MILLIS; 93 private static final long MAX_ALARM_ELAPSED_MS = DateUtils.DAY_IN_MILLIS; 143 ContentUris.appendId(uriBuilder, localStartMin - DateUtils.DAY_IN_MILLIS); in queryUpcomingEvents() 144 ContentUris.appendId(uriBuilder, localStartMax + DateUtils.DAY_IN_MILLIS); in queryUpcomingEvents() 252 reminderMinutes * DateUtils.MINUTE_IN_MILLIS; in queryNextReminderAndSchedule()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/enterprise/ |
D | AdminActionPreferenceControllerTestBase.java | 25 import android.text.format.DateUtils; 74 assertThat(preference.getSummary()).isEqualTo(DateUtils.formatDateTime( in testUpdateState() 75 mContext, date.getTime(), DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE)); in testUpdateState()
|