Home
last modified time | relevance | path

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

1234

/frameworks/base/core/tests/coretests/src/android/text/format/
DDateFormatTest.java39 assertTrue(DateFormat.hasDesignator("hh:mm:ss", DateFormat.MINUTE)); in testHasDesignator()
40 assertTrue(DateFormat.hasDesignator("myyyy", DateFormat.MINUTE)); in testHasDesignator()
41 assertTrue(DateFormat.hasDesignator("mmm", DateFormat.MINUTE)); in testHasDesignator()
43 assertFalse(DateFormat.hasDesignator("hh:MM:ss", DateFormat.MINUTE)); in testHasDesignator()
48 assertTrue(DateFormat.hasDesignator("hh:mm 'LOL'", DateFormat.MINUTE)); in testHasDesignatorEscaped()
50 assertFalse(DateFormat.hasDesignator("hh:mm 'yyyy'", DateFormat.YEAR)); in testHasDesignatorEscaped()
55 assertFalse(DateFormat.is24HourLocale(Locale.US)); in testIs24HourLocale()
56 assertTrue(DateFormat.is24HourLocale(Locale.GERMANY)); in testIs24HourLocale()
DDateUtilsTest.java34 import java.text.DateFormat;
121 DateFormat.set24HourTimePref(null); in testFormatSameDayTime()
130 fixedTime + dayDuration, fixedTime, java.text.DateFormat.FULL, in testFormatSameDayTime()
131 java.text.DateFormat.FULL)); in testFormatSameDayTime()
133 fixedTime, java.text.DateFormat.DEFAULT, java.text.DateFormat.FULL)); in testFormatSameDayTime()
135 fixedTime, java.text.DateFormat.LONG, java.text.DateFormat.FULL)); in testFormatSameDayTime()
137 fixedTime, java.text.DateFormat.MEDIUM, java.text.DateFormat.FULL)); in testFormatSameDayTime()
139 fixedTime, java.text.DateFormat.SHORT, java.text.DateFormat.FULL)); in testFormatSameDayTime()
143 fixedTime + hourDuration, fixedTime, java.text.DateFormat.FULL, in testFormatSameDayTime()
144 java.text.DateFormat.FULL)); in testFormatSameDayTime()
[all …]
/frameworks/base/core/java/android/text/format/
DDateFormat.java62 public class DateFormat { class
206 final java.text.DateFormat natural = in is24HourLocale()
207 java.text.DateFormat.getTimeInstance(java.text.DateFormat.LONG, locale); in is24HourLocale()
263 public static java.text.DateFormat getTimeFormat(Context context) { in getTimeFormat()
299 public static java.text.DateFormat getDateFormat(Context context) { in getDateFormat()
301 return java.text.DateFormat.getDateInstance(java.text.DateFormat.SHORT, locale); in getDateFormat()
310 public static java.text.DateFormat getLongDateFormat(Context context) { in getLongDateFormat()
312 return java.text.DateFormat.getDateInstance(java.text.DateFormat.LONG, locale); in getLongDateFormat()
321 public static java.text.DateFormat getMediumDateFormat(Context context) { in getMediumDateFormat()
323 return java.text.DateFormat.getDateInstance(java.text.DateFormat.MEDIUM, locale); in getMediumDateFormat()
[all …]
DDateUtils.java341 flags |= DateFormat.is24HourFormat(c) ? FORMAT_24HOUR : FORMAT_12HOUR; in getRelativeDateTimeString()
496 java.text.DateFormat f; in formatSameDayTime()
501 f = java.text.DateFormat.getTimeInstance(timeStyle); in formatSameDayTime()
503 f = java.text.DateFormat.getDateInstance(dateStyle); in formatSameDayTime()
746 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/packages/SettingsLib/src/com/android/settingslib/utils/
DPowerUtil.java20 import android.icu.text.DateFormat;
219 String skeleton = android.text.format.DateFormat.getTimeFormatString(context); in getDateTimeStringFromMs()
220 DateFormat fmt = DateFormat.getInstanceForSkeleton(skeleton); in getDateTimeStringFromMs()
233 String skeleton = android.text.format.DateFormat.getTimeFormatString(context); in getRegularTimeRemainingShortString()
234 DateFormat fmt = DateFormat.getInstanceForSkeleton(skeleton); in getRegularTimeRemainingShortString()
/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/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.java38 import android.text.format.DateFormat;
451 return DateFormat.is24HourFormat(getContext(), ActivityManager.getCurrentUser()); in is24HourModeEnabled()
453 return DateFormat.is24HourFormat(getContext()); in is24HourModeEnabled()
524 mHasSeconds = DateFormat.hasSeconds(mFormat); in chooseFormat()
651 setText(DateFormat.format(mFormat, mTime)); in onTimeChanged()
652 setContentDescription(DateFormat.format(mDescFormat, mTime)); in onTimeChanged()
DDateTimeView.java41 import java.text.DateFormat;
73 DateFormat mLastFormat;
209 DateFormat format; in update()
219 format = DateFormat.getDateInstance(DateFormat.SHORT); in update()
345 private DateFormat getTimeFormat() { in getTimeFormat()
346 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()
DTimePickerSpinnerDelegate.java26 import android.text.format.DateFormat;
229 final String bestDateTimePattern = DateFormat.getBestDateTimePattern(mLocale, in getHourFormatData()
249 final String bestDateTimePattern = DateFormat.getBestDateTimePattern(mLocale, in isAmPmAtStart()
265 final String bestDateTimePattern = DateFormat.getBestDateTimePattern(mLocale, in setDividerText()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DDateView.java24 import android.icu.text.DateFormat;
43 private DateFormat mDateFormat;
116 DateFormat format = DateFormat.getInstanceForSkeleton(mDatePattern, l); in updateClock()
/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/util/time/
DDateFormatUtil.java21 import android.text.format.DateFormat;
38 return DateFormat.is24HourFormat(mContext, ActivityManager.getCurrentUser()); in is24HourFormat()
/frameworks/base/packages/SystemUI/src/com/android/keyguard/clock/
DImageClock.java19 import android.text.format.DateFormat;
54 mDescFormat = ((SimpleDateFormat) DateFormat.getTimeFormat(context)).toLocalizedPattern(); in ImageClock()
66 setContentDescription(DateFormat.format(mDescFormat, mTime)); in onTimeChanged()
/frameworks/base/tests/DozeTest/src/com/android/dreams/dozetest/
DDozeTestDream.java28 import android.text.format.DateFormat;
65 private java.text.DateFormat mTimeFormat;
109 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.java33 import android.text.format.DateFormat;
162 String format = DateFormat.getBestDateTimePattern(Locale.getDefault(), "dMMMMyyyy"); in getSecurityPatch()
163 patch = DateFormat.format(format, patchDate).toString(); in getSecurityPatch()
/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/
DKeyguardSliceProvider.java30 import android.icu.text.DateFormat;
120 private DateFormat mDateFormat;
357 String pattern = android.text.format.DateFormat.is24HourFormat(getContext(), in updateNextAlarm()
359 mNextAlarm = android.text.format.DateFormat.format(pattern, in updateNextAlarm()
416 DateFormat format = DateFormat.getInstanceForSkeleton(mDatePattern, l); in getFormattedDateLocked()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/
DNightDisplayTile.java43 import java.text.DateFormat;
164 DateFormat nightTileFormat = android.text.format.DateFormat.getTimeFormat(mContext); in getSecondaryLabel()
/frameworks/base/tests/backup/src/com/android/backuptest/
DBackupTestActivity.java44 import java.text.DateFormat;
82 DateFormat formatter = DateFormat.getDateTimeInstance();
/frameworks/base/services/people/java/com/android/server/people/data/
DEvent.java21 import android.text.format.DateFormat;
206 sb.append("timestamp=").append(DateFormat.format("yyyy-MM-dd HH:mm:ss", mTimestamp)); in toString()
/frameworks/base/core/java/android/text/method/
DNumberKeyListener.java28 import android.text.format.DateFormat;
179 final String pattern = DateFormat.getBestDateTimePattern(locale, skeleton); in addFormatCharsFromSkeleton()

1234