From f1da3c384f780ffa2597bbc20b3dc3cb0fa8e9bc Mon Sep 17 00:00:00 2001 From: Material Design Team Date: Mon, 9 Oct 2023 11:33:37 -0700 Subject: [PATCH] Cleanup date formats that specify the same field multiple times. One of the usages was almost always meant to be something else. Most commonly the format reuses "m" (minutes of hour) instead of "M" (month of year) or "s" (second of minute) instead of "S" (milliseconds). Eg: "mm/dd/yyyy hh:mm:ss.sss" instead of "MM/dd/yyyy hh:mm:ss.SSS" #busy-beavers PiperOrigin-RevId: 571995047 --- .../android/material/datepicker/SingleDateSelectorTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/javatests/com/google/android/material/datepicker/SingleDateSelectorTest.java b/lib/javatests/com/google/android/material/datepicker/SingleDateSelectorTest.java index 8740380ff..36cee96a9 100644 --- a/lib/javatests/com/google/android/material/datepicker/SingleDateSelectorTest.java +++ b/lib/javatests/com/google/android/material/datepicker/SingleDateSelectorTest.java @@ -231,13 +231,13 @@ public class SingleDateSelectorTest { @Test public void textFieldPlaceholder_usesCustomFormat() { - singleDateSelector.setTextInputFormat(new SimpleDateFormat("kk:mm:ss mm/dd/yyyy")); + singleDateSelector.setTextInputFormat(new SimpleDateFormat("kk:mm:ss MM/dd/yyyy")); View root = getRootView(); ((ViewGroup) activity.findViewById(android.R.id.content)).addView(root); TextInputLayout textInputLayout = root.findViewById(R.id.mtrl_picker_text_input_date); - assertThat(textInputLayout.getPlaceholderText().toString()).isEqualTo("kk:mm:ss mm/dd/yyyy"); + assertThat(textInputLayout.getPlaceholderText().toString()).isEqualTo("kk:mm:ss MM/dd/yyyy"); } @Test