/packages/apps/Calendar/tests/src/com/android/calendar/ |
D | FormatDateRangeTest.java | 20 import android.text.format.DateUtils; 42 if ((flags & DateUtils.FORMAT_UTC) != 0) { in DateTest() 77 DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_ABBREV_ALL, "8 \u2013 11 AM"), 79 DateUtils.FORMAT_SHOW_TIME, "8:00 \u2013 11:00 AM"), 81 DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_24HOUR, "08:00 \u2013 17:00"), 83 DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_ABBREV_ALL, "8 AM \u2013 12 PM"), 85 … DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_NO_NOON | DateUtils.FORMAT_ABBREV_ALL, 88 … DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_CAP_NOON | DateUtils.FORMAT_ABBREV_ALL, 91 … DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_ABBREV_ALL, "10:30 AM \u2013 1:00 PM"), 93 DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_ABBREV_ALL, "1 \u2013 2 PM"), [all …]
|
D | WeekNumberTest.java | 20 import android.text.format.DateUtils; 210 int flags = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_NUMERIC_DATE; in testAll() 211 String output = DateUtils.formatDateTime(mContext, millis, flags); in testAll() 222 int flags = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_NUMERIC_DATE; in testAll() 223 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; 48 @VisibleForTesting public static final int FORCE_12_HOUR = DateUtils.FORMAT_12HOUR; 50 @VisibleForTesting public static final int FORCE_24_HOUR = DateUtils.FORMAT_24HOUR; 70 if (now - time < DateUtils.MINUTE_IN_MILLIS) { in getRelativeTimeSpanString() 80 return DateUtils.getRelativeTimeSpanString(time, now, DateUtils.MINUTE_IN_MILLIS, in getRelativeTimeSpanString() 81 DateUtils.FORMAT_ABBREV_RELATIVE).toString(); in getRelativeTimeSpanString() 135 if (!minPeriodToday && timeDiff < DateUtils.MINUTE_IN_MILLIS) { in getTimestamp() 137 } else if (!minPeriodToday && timeDiff < DateUtils.HOUR_IN_MILLIS) { in getTimestamp() 141 } else if (timeDiff < DateUtils.WEEK_IN_MILLIS) { in getTimestamp() 143 } 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/modules/HealthFitness/apk/src/com/android/healthconnect/controller/utils/ |
D | LocalDateTimeFormatter.kt | 20 import android.text.format.DateUtils 35 DateUtils.FORMAT_SHOW_WEEKDAY or 36 DateUtils.FORMAT_SHOW_DATE or 37 DateUtils.FORMAT_ABBREV_ALL 41 WEEKDAY_DATE_FORMAT_FLAGS_WITH_YEAR or DateUtils.FORMAT_NO_YEAR 45 DateUtils.FORMAT_SHOW_DATE or DateUtils.FORMAT_ABBREV_ALL 49 DATE_FORMAT_FLAGS_WITH_YEAR or DateUtils.FORMAT_NO_YEAR 53 DateUtils.FORMAT_SHOW_DATE or 54 DateUtils.FORMAT_SHOW_YEAR or 55 DateUtils.FORMAT_NO_MONTH_DAY [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/Calendar/src/com/android/calendar/ |
D | CalendarViewAdapter.kt | 21 import android.text.format.DateUtils 249 DateUtils.formatDateRange(mContext, mFormatter, mMilliTime, mMilliTime, in buildDayOfWeek() 250 DateUtils.FORMAT_SHOW_WEEKDAY, mTimeZone).toString()) in buildDayOfWeek() 253 DateUtils.formatDateRange(mContext, mFormatter, mMilliTime, mMilliTime, in buildDayOfWeek() 254 DateUtils.FORMAT_SHOW_WEEKDAY, mTimeZone).toString()) in buildDayOfWeek() 257 DateUtils.formatDateRange(mContext, mFormatter, mMilliTime, mMilliTime, in buildDayOfWeek() 258 DateUtils.FORMAT_SHOW_WEEKDAY, mTimeZone).toString()) in buildDayOfWeek() 260 DateUtils.formatDateRange(mContext, mFormatter, mMilliTime, mMilliTime, in buildDayOfWeek() 261 DateUtils.FORMAT_SHOW_WEEKDAY, mTimeZone).toString() in buildDayOfWeek() 274 return DateUtils.formatDateRange(mContext, mFormatter, mMilliTime, mMilliTime, in buildFullDate() [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/DeskClock/src/com/android/deskclock/ |
D | StopwatchTextController.kt | 19 import android.text.format.DateUtils 40 val hours = (accumulatedTime / DateUtils.HOUR_IN_MILLIS).toInt() in setTimeString() 41 var remainder = (accumulatedTime % DateUtils.HOUR_IN_MILLIS).toInt() in setTimeString() 43 val minutes = (remainder / DateUtils.MINUTE_IN_MILLIS).toInt() in setTimeString() 44 remainder = (remainder % DateUtils.MINUTE_IN_MILLIS).toInt() in setTimeString() 46 val seconds = (remainder / DateUtils.SECOND_IN_MILLIS).toInt() in setTimeString() 47 remainder = (remainder % DateUtils.SECOND_IN_MILLIS).toInt() in setTimeString() 53 if (mLastTime / DateUtils.SECOND_IN_MILLIS != in setTimeString() 54 accumulatedTime / DateUtils.SECOND_IN_MILLIS) { in setTimeString()
|
D | TimerTextController.kt | 19 import android.text.format.DateUtils 34 var hours = (variableRemainingTime / DateUtils.HOUR_IN_MILLIS).toInt() in setTimeString() 35 var remainder = (variableRemainingTime % DateUtils.HOUR_IN_MILLIS).toInt() in setTimeString() 37 var minutes = (remainder / DateUtils.MINUTE_IN_MILLIS).toInt() in setTimeString() 38 remainder = (remainder % DateUtils.MINUTE_IN_MILLIS).toInt() in setTimeString() 40 var seconds = (remainder / DateUtils.SECOND_IN_MILLIS).toInt() in setTimeString() 41 remainder = (remainder % DateUtils.SECOND_IN_MILLIS).toInt() in setTimeString()
|
/packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/ |
D | CellBroadcastListItem.java | 27 import android.text.format.DateUtils; 80 mDateView.setText(DateUtils.formatDateTime(getContext(), message.getReceivedTime(), in bind() 81 DateUtils.FORMAT_NO_NOON_MIDNIGHT | DateUtils.FORMAT_SHOW_TIME in bind() 82 | DateUtils.FORMAT_ABBREV_ALL | DateUtils.FORMAT_SHOW_DATE in bind() 83 | DateUtils.FORMAT_CAP_AMPM)); in bind() 110 int flags = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE; in dispatchPopulateAccessibilityEvent() 111 String dateTime = DateUtils.formatDateTime(getContext(), mCbMessage.getReceivedTime(), in dispatchPopulateAccessibilityEvent()
|
/packages/modules/Connectivity/tests/common/java/android/net/netstats/ |
D | NetworkStatsHistoryTest.kt | 20 import android.text.format.DateUtils in <lambda>() 45 .Builder(DateUtils.HOUR_IN_MILLIS, /* initialCapacity */ 10).build() in <lambda>() 47 assertEquals(DateUtils.HOUR_IN_MILLIS, statsEmpty.bucketDuration) in <lambda>() 49 .Builder(DateUtils.HOUR_IN_MILLIS, /* initialCapacity */ 8) in <lambda>() 53 assertEquals(DateUtils.HOUR_IN_MILLIS, statsSingle.bucketDuration) in <lambda>() 56 .Builder(DateUtils.SECOND_IN_MILLIS, /* initialCapacity */ 0) in <lambda>() 59 assertEquals(DateUtils.SECOND_IN_MILLIS, statsMultiple.bucketDuration) in <lambda>() 79 .Builder(DateUtils.SECOND_IN_MILLIS, /* initialCapacity */ 0) in <lambda>() 82 assertEquals(DateUtils.SECOND_IN_MILLIS, statsMultiple.bucketDuration) in <lambda>()
|
/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/Calendar/tests/src/com/android/calendar/widget/ |
D | CalendarAppWidgetServiceTest.java | 23 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/Settings/src/com/android/settings/datausage/lib/ |
D | NetworkUsageData.kt | 20 import android.text.format.DateUtils 36 DateUtils.formatDateTime(context, startTime, DATE_FORMAT) in formatStartDate() 39 DateUtils.formatDateRange(context, startTime, endTime, DATE_FORMAT) in formatStartDate() 54 private const val DATE_FORMAT = DateUtils.FORMAT_SHOW_DATE or DateUtils.FORMAT_ABBREV_MONTH in formatStartDate()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/base/ |
D | Shared.java | 39 import android.text.format.DateUtils; 198 int flags = DateUtils.FORMAT_NO_NOON | DateUtils.FORMAT_NO_MIDNIGHT in formatTime() 199 | DateUtils.FORMAT_ABBREV_ALL; in formatTime() 202 flags |= DateUtils.FORMAT_SHOW_YEAR | DateUtils.FORMAT_SHOW_DATE; in formatTime() 204 flags |= DateUtils.FORMAT_SHOW_DATE; in formatTime() 206 flags |= DateUtils.FORMAT_SHOW_TIME; in formatTime() 209 return DateUtils.formatDateTime(context, when, flags); in formatTime()
|
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/ |
D | CalendarConfidenceCheckerTest.java | 22 import android.text.format.DateUtils; 98 mInjectedRealtimeMillis += DateUtils.DAY_IN_MILLIS - (15 * DateUtils.MINUTE_IN_MILLIS); in testWithLastCheckTime() 112 mInjectedRealtimeMillis += DateUtils.DAY_IN_MILLIS - (15 * DateUtils.MINUTE_IN_MILLIS); in testWithLastCheckTime()
|
/packages/apps/Settings/tests/spa_unit/src/com/android/settings/datausage/lib/ |
D | NetworkCycleDataRepositoryTest.kt | 22 import android.text.format.DateUtils 45 startTime = CYCLE2_END_TIME - DateUtils.WEEK_IN_MILLIS * 4, in <lambda>() 94 startTime = CYCLE2_END_TIME - DateUtils.WEEK_IN_MILLIS * 4, in <lambda>() 112 startTime = CYCLE2_END_TIME - DateUtils.WEEK_IN_MILLIS * 4, in <lambda>() 129 const val CYCLE3_END_TIME = CYCLE3_START_TIME + DateUtils.DAY_IN_MILLIS 133 const val CYCLE4_END_TIME = CYCLE4_START_TIME + DateUtils.DAY_IN_MILLIS
|
/packages/apps/DeskClock/src/com/android/deskclock/stopwatch/ |
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/apps/TvSettings/Settings/src/com/android/tv/settings/enterprise/ |
D | AdminActionPreferenceControllerBase.java | 20 import android.text.format.DateUtils; 51 : DateUtils.formatDateTime(mContext, timestamp.getTime(), in updateState() 52 DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE)); in updateState()
|
/packages/apps/DeskClock/src/com/android/deskclock/uidata/ |
D | PeriodicCallbackModel.kt | 25 import android.text.format.DateUtils 161 private const val QUARTER_HOUR_IN_MILLIS = 15 * DateUtils.MINUTE_IN_MILLIS 181 val lastMinute = periodStart - periodStart % DateUtils.MINUTE_IN_MILLIS in getDelay() 182 val nextMinute = lastMinute + DateUtils.MINUTE_IN_MILLIS in getDelay() 191 val lastHour = periodStart - periodStart % DateUtils.HOUR_IN_MILLIS in getDelay() 192 val nextHour = lastHour + DateUtils.HOUR_IN_MILLIS in getDelay()
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/enterprise/ |
D | BugReportsPreferenceControllerTest.java | 18 import android.text.format.DateUtils; 61 String formattedDate = DateUtils.formatDateTime(mRealContext, now, in testUpdateState_withBugreport() 62 DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE); in testUpdateState_withBugreport()
|
D | NetworkLogsPreferenceControllerTest.java | 18 import android.text.format.DateUtils; 61 String formattedDate = DateUtils.formatDateTime(mRealContext, now, in testUpdateState_withLogs() 62 DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE); in testUpdateState_withLogs()
|
D | SecurityLogsPreferenceControllerTest.java | 18 import android.text.format.DateUtils; 61 String formattedDate = DateUtils.formatDateTime(mRealContext, now, in testUpdateState_withLogs() 62 DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE); in testUpdateState_withLogs()
|
/packages/apps/Car/Settings/src/com/android/car/settings/enterprise/ |
D | BaseAdminActionReporterPreferenceController.java | 21 import android.text.format.DateUtils; 49 preference.setSummary(DateUtils.formatDateTime(getContext(), timestamp.getTime(), in updateState() 50 DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE)); in updateState()
|