diff options
author | Jay Shrauner <shrauner@google.com> | 2014-05-02 16:17:17 -0700 |
---|---|---|
committer | Jay Shrauner <shrauner@google.com> | 2014-05-02 16:17:17 -0700 |
commit | 2fc13087e700ee044684adb99e7114c9f477c67f (patch) | |
tree | 0e81035407393b229512f0d8c1e47ca02011b276 /tests | |
parent | f21e6a8983f2ff9eb8bcff2612c2fefd1076f554 (diff) | |
download | android_packages_apps_Email-2fc13087e700ee044684adb99e7114c9f477c67f.tar.gz android_packages_apps_Email-2fc13087e700ee044684adb99e7114c9f477c67f.tar.bz2 android_packages_apps_Email-2fc13087e700ee044684adb99e7114c9f477c67f.zip |
Parse abbreviated date fields
Add support for abbreviated dates with no timestamp (eg, "2009-01-02") to
parseEmailDateTimeToMillis.
Bug:14496986
Change-Id: Ifc77cb75fd9e23536b48c8f6ecefc0e2e8f1cc2c
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/emailcommon/utility/UtilityTest.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/src/com/android/emailcommon/utility/UtilityTest.java b/tests/src/com/android/emailcommon/utility/UtilityTest.java index 3d08244b4..c5b0e7f77 100644 --- a/tests/src/com/android/emailcommon/utility/UtilityTest.java +++ b/tests/src/com/android/emailcommon/utility/UtilityTest.java @@ -63,8 +63,10 @@ public class UtilityTest extends TestCase { 2010, 2, 23, 16, 1, 5, 0); testParseEmailDateTimeHelper("2009-02-11T18:03:31.123Z", 2009, 2, 11, 18, 3, 31, 123); + testParseEmailDateTimeHelper("2009-02-11", + 2009, 2, 11, 0, 0, 0, 0); try { - testParseEmailDateTimeHelper("2010-02-23", 1970, 1, 1, 0, 0, 0, 0); + testParseEmailDateTimeHelper("2010-02", 1970, 1, 1, 0, 0, 0, 0); fail("Expected ParseException"); } catch (ParseException e) { // expected |