Home
last modified time | relevance | path

Searched refs:DateFormat (Results 1 – 25 of 79) sorted by relevance

1234

/frameworks/base/core/tests/coretests/src/android/text/format/
DDateFormatTest.java38 assertTrue(DateFormat.hasDesignator("hh:mm:ss", DateFormat.MINUTE)); in testHasDesignator()
39 assertTrue(DateFormat.hasDesignator("myyyy", DateFormat.MINUTE)); in testHasDesignator()
40 assertTrue(DateFormat.hasDesignator("mmm", DateFormat.MINUTE)); in testHasDesignator()
42 assertFalse(DateFormat.hasDesignator("hh:MM:ss", DateFormat.MINUTE)); in testHasDesignator()
47 assertTrue(DateFormat.hasDesignator("hh:mm 'LOL'", DateFormat.MINUTE)); in testHasDesignatorEscaped()
49 assertFalse(DateFormat.hasDesignator("hh:mm 'yyyy'", DateFormat.YEAR)); in testHasDesignatorEscaped()
54 assertFalse(DateFormat.is24HourLocale(Locale.US)); in testIs24HourLocale()
55 assertTrue(DateFormat.is24HourLocale(Locale.GERMANY)); in testIs24HourLocale()
DDateUtilsTest.java33 import java.text.DateFormat;
120 DateFormat.is24Hour = null; in testFormatSameDayTime()
129 fixedTime + dayDuration, fixedTime, java.text.DateFormat.FULL, in testFormatSameDayTime()
130 java.text.DateFormat.FULL)); in testFormatSameDayTime()
132 fixedTime, java.text.DateFormat.DEFAULT, java.text.DateFormat.FULL)); in testFormatSameDayTime()
134 fixedTime, java.text.DateFormat.LONG, java.text.DateFormat.FULL)); in testFormatSameDayTime()
136 fixedTime, java.text.DateFormat.MEDIUM, java.text.DateFormat.FULL)); in testFormatSameDayTime()
138 fixedTime, java.text.DateFormat.SHORT, java.text.DateFormat.FULL)); in testFormatSameDayTime()
142 fixedTime + hourDuration, fixedTime, java.text.DateFormat.FULL, in testFormatSameDayTime()
143 java.text.DateFormat.FULL)); in testFormatSameDayTime()
[all …]
/frameworks/base/core/java/android/text/format/
DDateFormat.java62 public class DateFormat { class
205 final java.text.DateFormat natural = in is24HourLocale()
206 java.text.DateFormat.getTimeInstance(java.text.DateFormat.LONG, locale); in is24HourLocale()
262 public static java.text.DateFormat getTimeFormat(Context context) { in getTimeFormat()
296 public static java.text.DateFormat getDateFormat(Context context) { in getDateFormat()
298 return java.text.DateFormat.getDateInstance(java.text.DateFormat.SHORT, locale); in getDateFormat()
307 public static java.text.DateFormat getLongDateFormat(Context context) { in getLongDateFormat()
309 return java.text.DateFormat.getDateInstance(java.text.DateFormat.LONG, locale); in getLongDateFormat()
318 public static java.text.DateFormat getMediumDateFormat(Context context) { in getMediumDateFormat()
320 return java.text.DateFormat.getDateInstance(java.text.DateFormat.MEDIUM, locale); in getMediumDateFormat()
[all …]
DDateUtils.java333 flags |= DateFormat.is24HourFormat(c) ? FORMAT_24HOUR : FORMAT_12HOUR; in getRelativeDateTimeString()
486 java.text.DateFormat f; in formatSameDayTime()
491 f = java.text.DateFormat.getTimeInstance(timeStyle); in formatSameDayTime()
493 f = java.text.DateFormat.getDateInstance(dateStyle); in formatSameDayTime()
732 flags |= DateFormat.is24HourFormat(context) ? FORMAT_24HOUR : FORMAT_12HOUR; in formatDateRange()
/frameworks/base/core/java/android/service/autofill/
DDateValueSanitizer.java24 import android.icu.text.DateFormat;
47 private final DateFormat mDateFormat;
54 public DateValueSanitizer(@NonNull DateFormat dateFormat) { in DateValueSanitizer()
115 return new DateValueSanitizer((DateFormat) parcel.readSerializable());
DDateTransformation.java23 import android.icu.text.DateFormat;
51 private final DateFormat mDateFormat;
59 public DateTransformation(@NonNull AutofillId id, @NonNull DateFormat dateFormat) { in DateTransformation()
119 (DateFormat) parcel.readSerializable());
/frameworks/base/services/core/java/com/android/server/twilight/
DTwilightState.java19 import android.text.format.DateFormat;
101 + " sunrise=" + DateFormat.format("MM-dd HH:mm", mSunriseTimeMillis) in toString()
102 + " sunset="+ DateFormat.format("MM-dd HH:mm", mSunsetTimeMillis) in toString()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DDateView.java24 import android.icu.text.DateFormat;
42 private DateFormat mDateFormat;
107 DateFormat format = DateFormat.getInstanceForSkeleton(mDatePattern, l); in updateClock()
DSplitClockView.java25 import android.text.format.DateFormat;
90 String formatString = DateFormat.getTimeFormatString(getContext(), in updatePatterns()
/frameworks/base/core/java/android/widget/
DDigitalClock.java24 import android.text.format.DateFormat;
85 setText(DateFormat.format(mFormat, mCalendar)); in onAttachedToWindow()
104 mFormat = DateFormat.getTimeFormatString(getContext()); in setFormat()
DTextClock.java37 import android.text.format.DateFormat;
439 return DateFormat.is24HourFormat(getContext(), ActivityManager.getCurrentUser()); in is24HourModeEnabled()
441 return DateFormat.is24HourFormat(getContext()); in is24HourModeEnabled()
510 mHasSeconds = DateFormat.hasSeconds(mFormat); in chooseFormat()
630 setText(DateFormat.format(mFormat, mTime)); in onTimeChanged()
631 setContentDescription(DateFormat.format(mDescFormat, mTime)); in onTimeChanged()
DDateTimeView.java42 import java.text.DateFormat;
68 DateFormat mLastFormat;
196 DateFormat format; in update()
206 format = DateFormat.getDateInstance(DateFormat.SHORT); in update()
335 private DateFormat getTimeFormat() { in getTimeFormat()
336 return android.text.format.DateFormat.getTimeFormat(getContext()); in getTimeFormat()
DDatePickerCalendarDelegate.java25 import android.icu.text.DateFormat;
64 private DateFormat mYearFormat;
65 private DateFormat mMonthDayFormat;
298 mMonthDayFormat = DateFormat.getInstanceForSkeleton("EMMMd", locale); in onLocaleChanged()
300 mYearFormat = DateFormat.getInstanceForSkeleton("y", locale); in onLocaleChanged()
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DDatePicker.java24 import android.text.format.DateFormat;
206 java.text.DateFormat format; in reorderPickers()
217 format = DateFormat.getDateFormat(getContext()); in reorderPickers()
219 format = DateFormat.getMediumDateFormat(getContext()); in reorderPickers()
226 order = new String(DateFormat.getDateFormatOrder(getContext())); in reorderPickers()
246 if (c == DateFormat.DATE && !didDay) { in reorderPickers()
249 } else if ((c == DateFormat.MONTH || c == 'L') && !didMonth) { in reorderPickers()
252 } else if (c == DateFormat.YEAR && !didYear) { in reorderPickers()
/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/
DKeyguardSliceProvider.java29 import android.icu.text.DateFormat;
83 private DateFormat mDateFormat;
213 String pattern = android.text.format.DateFormat.is24HourFormat(getContext(), in updateNextAlarm()
215 mNextAlarm = android.text.format.DateFormat.format(pattern, in updateNextAlarm()
267 DateFormat format = DateFormat.getInstanceForSkeleton(mDatePattern, l); in getFormattedDate()
/frameworks/base/tests/utils/SleepUtils/WakeLoopService/src/android/test/wakeuploop/
DFileUtil.java24 import java.text.DateFormat;
31 private static DateFormat sDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
/frameworks/support/leanback/src/main/java/androidx/leanback/widget/picker/
DDatePicker.java28 import java.text.DateFormat;
63 final DateFormat mDateFormat = new SimpleDateFormat(DATE_FORMAT);
108 android.text.format.DateFormat.getDateFormatOrder(context)); in DatePicker()
135 yearPattern = android.text.format.DateFormat.getBestDateTimePattern(mConstant.locale, in getBestYearMonthDayPattern()
138 final java.text.DateFormat dateFormat = android.text.format.DateFormat.getDateFormat( in getBestYearMonthDayPattern()
222 android.text.format.DateFormat.getDateFormatOrder(getContext())); in setDatePickerFormat()
DTimePicker.java22 import android.text.format.DateFormat;
111 DateFormat.is24HourFormat(context)); in TimePicker()
151 hourPattern = DateFormat.getBestDateTimePattern(mConstant.locale, mIs24hFormat ? "Hma" in getBestHourMinutePattern()
156 final java.text.DateFormat dateFormat = in getBestHourMinutePattern()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/utils/
DPowerUtil.java20 import android.icu.text.DateFormat;
146 String skeleton = android.text.format.DateFormat.getTimeFormatString(context); in getRegularTimeRemainingString()
147 DateFormat fmt = DateFormat.getInstanceForSkeleton(skeleton); in getRegularTimeRemainingString()
/frameworks/base/tools/preload2/src/com/android/preload/
DDumpDataIO.java27 import java.text.DateFormat;
62 DateFormat.getDateTimeInstance().format(d.date) +"\">\n"); in serialize()
108 Date date = DateFormat.getDateTimeInstance().parse(dateString); in startElement()
/frameworks/base/tests/DozeTest/src/com/android/dreams/dozetest/
DDozeTestDream.java28 import android.text.format.DateFormat;
65 private java.text.DateFormat mTimeFormat;
110 mTimeFormat = DateFormat.getTimeFormat(this); in onAttachedToWindow()
/frameworks/base/tests/BatteryWaster/src/com/android/batterywaster/
DBatteryWaster.java32 import java.text.DateFormat;
40 DateFormat mDateFormat;
59 mDateFormat = DateFormat.getInstance(); in onCreate()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/
DDeviceInfoUtils.java31 import android.text.format.DateFormat;
161 String format = DateFormat.getBestDateTimePattern(Locale.getDefault(), "dMMMMyyyy"); in getSecurityPatch()
162 patch = DateFormat.format(format, patchDate).toString(); in getSecurityPatch()
/frameworks/base/tests/backup/src/com/android/backuptest/
DBackupTestActivity.java44 import java.text.DateFormat;
82 DateFormat formatter = DateFormat.getDateTimeInstance();
/frameworks/base/config/
Dhiddenapi-removed-dex.txt315 Landroid/text/format/DateFormat;->AM_PM:C
316 Landroid/text/format/DateFormat;->CAPITAL_AM_PM:C
317 Landroid/text/format/DateFormat;->DATE:C
318 Landroid/text/format/DateFormat;->DAY:C
319 Landroid/text/format/DateFormat;->HOUR:C
320 Landroid/text/format/DateFormat;->HOUR_OF_DAY:C
321 Landroid/text/format/DateFormat;->MINUTE:C
322 Landroid/text/format/DateFormat;->MONTH:C
323 Landroid/text/format/DateFormat;->QUOTE:C
324 Landroid/text/format/DateFormat;->SECONDS:C
[all …]

1234