/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/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/TV/tests/robotests/src/com/android/tv/util/ |
D | UtilsTest.java | 22 import android.text.format.DateUtils; 102 DateUtils.FORMAT_12HOUR)); in testSameDateAndTime() 111 DateUtils.FORMAT_24HOUR)); in testSameDateAndTime() 124 DateUtils.FORMAT_12HOUR)); in testDurationWithinToday() 133 DateUtils.FORMAT_24HOUR)); in testDurationWithinToday() 146 DateUtils.FORMAT_12HOUR)); in testDurationFromYesterdayToToday() 155 DateUtils.FORMAT_24HOUR)); in testDurationFromYesterdayToToday() 164 DateUtils.FORMAT_12HOUR)); in testDurationFromYesterdayToToday() 173 DateUtils.FORMAT_24HOUR)); in testDurationFromYesterdayToToday() 186 DateUtils.FORMAT_12HOUR)); in testDurationFromTodayToTomorrow() [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/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/ |
D | CellBroadcastListItem.java | 26 import android.text.format.DateUtils; 70 mDateView.setText(DateUtils.formatDateTime(getContext(), message.getReceivedTime(), in bind() 71 DateUtils.FORMAT_NO_NOON_MIDNIGHT | DateUtils.FORMAT_SHOW_TIME in bind() 72 | DateUtils.FORMAT_ABBREV_ALL | DateUtils.FORMAT_SHOW_DATE in bind() 73 | DateUtils.FORMAT_CAP_AMPM)); in bind() 100 int flags = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE; in dispatchPopulateAccessibilityEvent() 101 String dateTime = DateUtils.formatDateTime(getContext(), mCbMessage.getReceivedTime(), in dispatchPopulateAccessibilityEvent()
|
/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()
|
D | LapsAdapter.kt | 20 import android.text.format.DateUtils 283 private val TEN_MINUTES: Long = 10 * DateUtils.MINUTE_IN_MILLIS 284 private val HOUR: Long = DateUtils.HOUR_IN_MILLIS 313 hours = (time / DateUtils.HOUR_IN_MILLIS).toInt() in formatTime() 314 var remainder = (time % DateUtils.HOUR_IN_MILLIS).toInt() in formatTime() 315 minutes = (remainder / DateUtils.MINUTE_IN_MILLIS).toInt() in formatTime() 316 remainder = (remainder % DateUtils.MINUTE_IN_MILLIS).toInt() in formatTime() 317 seconds = (remainder / DateUtils.SECOND_IN_MILLIS).toInt() in formatTime() 318 remainder = (remainder % DateUtils.SECOND_IN_MILLIS).toInt() 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/apps/DeskClock/src/com/android/deskclock/uidata/ |
D | PeriodicCallbackModel.kt | 24 import android.text.format.DateUtils 160 private const val QUARTER_HOUR_IN_MILLIS = 15 * DateUtils.MINUTE_IN_MILLIS 180 val lastMinute = periodStart - periodStart % DateUtils.MINUTE_IN_MILLIS in getDelay() 181 val nextMinute = lastMinute + DateUtils.MINUTE_IN_MILLIS in getDelay() 190 val lastHour = periodStart - periodStart % DateUtils.HOUR_IN_MILLIS in getDelay() 191 val nextHour = lastHour + DateUtils.HOUR_IN_MILLIS in getDelay()
|
/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/TV/src/com/android/tv/util/ |
D | Utils.java | 39 import android.text.format.DateUtils; 434 DateUtils.FORMAT_ABBREV_MONTH in getDurationString() 435 | ((useShortFormat) ? DateUtils.FORMAT_NUMERIC_DATE : 0); in getDurationString() 438 flags |= DateUtils.FORMAT_SHOW_TIME; in getDurationString() 441 flags |= DateUtils.FORMAT_SHOW_DATE; in getDurationString() 443 if (!showDate || (flags & DateUtils.FORMAT_SHOW_YEAR) == 0) { in getDurationString() 445 flags |= DateUtils.FORMAT_NO_YEAR; in getDurationString() 456 return DateUtils.formatDateRange( in getDurationString() 462 String dateRange = DateUtils.formatDateRange(context, startUtcMillis, endUtcMillis, flags); in getDurationString() 465 : DateUtils.formatDateRange(context, startUtcMillis, endUtcMillis + 1, flags); in getDurationString() [all …]
|
/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()
|