diff options
author | Narayan Kamath <narayan@google.com> | 2015-05-05 12:37:36 +0100 |
---|---|---|
committer | Narayan Kamath <narayan@google.com> | 2015-05-12 11:19:59 +0100 |
commit | e35062069f0ab8fc45954239127199b99e8b954c (patch) | |
tree | 96861b5450b83392dd15381eb44c7bec6125b123 /luni | |
parent | 4d82cc9740553b35a56c1b0c0146a868b90c34f1 (diff) | |
download | libcore-e35062069f0ab8fc45954239127199b99e8b954c.zip libcore-e35062069f0ab8fc45954239127199b99e8b954c.tar.gz libcore-e35062069f0ab8fc45954239127199b99e8b954c.tar.bz2 |
Add a test for bug 20708022.
Check that we correctly format date ranges that end at 00:00 on
the first day of a month.
bug: 20708022.
(cherry picked from commit 61dd198b79cd5c63fd8f18f7096b0f44b1491cd5)
Change-Id: Ia6387ac560024115314fd3fee2669c6cc11020a7
Diffstat (limited to 'luni')
-rw-r--r-- | luni/src/test/java/libcore/icu/DateIntervalFormatTest.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/luni/src/test/java/libcore/icu/DateIntervalFormatTest.java b/luni/src/test/java/libcore/icu/DateIntervalFormatTest.java index 7adad72..6e0bce6 100644 --- a/luni/src/test/java/libcore/icu/DateIntervalFormatTest.java +++ b/luni/src/test/java/libcore/icu/DateIntervalFormatTest.java @@ -423,4 +423,13 @@ public class DateIntervalFormatTest extends junit.framework.TestCase { assertEquals("11 AM – 1 PM", formatDateRange(l, utc, 11*HOUR, 13*HOUR, flags)); assertEquals("2 – 3 PM", formatDateRange(l, utc, 14*HOUR, 15*HOUR, flags)); } + + // http://b/20708022 + public void testEndOfDayOnLastDayOfMonth() throws Exception { + final ULocale locale = new ULocale("en"); + final TimeZone timeZone = TimeZone.getTimeZone("UTC"); + + assertEquals("April 30, 11:00 PM – May 1, 12:00 AM", formatDateRange(locale, timeZone, + 1430434800000L, 1430438400000L, FORMAT_SHOW_TIME)); + } } |