summaryrefslogtreecommitdiff
path: root/annotations/generate_annotated_java_files.py
diff options
context:
space:
mode:
authorPete Gillin <peteg@google.com>2018-02-27 13:22:02 +0000
committerPete Gillin <peteg@google.com>2018-02-28 15:47:50 +0000
commit9ecf6aa75b0a62df06e66e3c6a7e12f802b8c89d (patch)
tree6a41df0ad8767c1d1a4b647ace1c37c5acf0b537 /annotations/generate_annotated_java_files.py
parentfa1f4a384ebd4d69e4bd0feceb1eadbf76b05079 (diff)
Fix midnight-to-next-midnight bug in DateIntervalFormat.
There is special handling in DateIntervalFormat.formatDateRange for ranges which end at midnight. When showing times, and the end-point is midnight of the day following the start-point, it suppresses the end date so that it shows e.g. "February 27, 04:00 - 00:00" instead of "February 27, 04:00 - February 28, 00:00". This behaviour is broken when the start date is also midnight, we need the dates there to disambiguate (rather than creating an empty range). This change addresses that, while preserving all other behaviours. Tests are added to cover various aspects of this special casing. The second of the four assertions added fails without this change. Bug: 68847519 Test: cts-tradefed run cts-dev -m CtsLibcoreTestCases Test: cts-tradefed run cts-dev -m CtsTextTestCases -t android.text.format.cts.DateUtilsTest Change-Id: I7d109af69e1962163b74c5837fd782156765fbe2
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions