d48197ec78f54c6adb3fec78c3bcc384b7ce2e40 |
|
02-Mar-2018 |
Przemyslaw Szczepaniak <pszczepaniak@google.com> |
Calarify SimpleDateFormat symbols X documentation. Added clarification that "Z" in "ISO 8601 Time zone" paragraph refers to the letter Z in parsed string not the "Z" symbol. Added clarification that pattern of letters for "ISO 8601 Time zone" is X. Test: make docs Bug: 70206473 Change-Id: Id4245e33b56bbbce2551e90da3bfbba609d861b7
|
fb1a78d35d56cc48cc5ec5503d2bfff3406b923f |
|
26-Jan-2018 |
Neil Fuller <nfuller@google.com> |
Remove special UTC handling in SimpleDateFormat ICU59 introduced support for localized UTC names. Special-case formating / parsing logic for UTC can therefore be removed from SimpleDateFormat. This change removes the explicit UTC logic and adds some new tests. In reality the SimpleDateFormat change means that: 1) Formatting "zzzz" will generate a long localized string (previously it would have produced "UTC"). 2) Parsing "zzzz" is unchanged as SimpleDateFormat was already doing a lookup in ICU if the timezone string wasn't an exact match for "UTC". 3) "z" formatting and parsing behavior is unchanged as the short form of UTC offered for most languages by ICU is "UTC". There may be compatibility issues for apps that have come to assume "UTC" is the output for "zzzz" all languages. The only one of the new tests that fails under the old scheme is: libcore.java.text.SimpleDateFormatTest#testFormatUtcLong because the test has explicit expecations around the "zzzz" form of UTC. Test: CTS: run cts -m CtsLibcoreTestCases Bug: 36337342 Change-Id: Ia8daa49420af82ed69b00bf8e75e0c8727f6bd1f
|
59f1a7d46654a2893d38532d2cfb33c1e6af1dd4 |
|
18-Jan-2018 |
Victor Chang <vichang@google.com> |
Refactor package-private SimpleDateFormat(int, int, Locale) constructor - Upstream has removed the contructor in favour of LocaleProviderAdapter However, Android doesn't use SPI and has no LocaleProviderAdapter - There should be no behavior change in this CL Test: CtsLibcoreTestCases Bug: 66411240 Change-Id: Ie14e11c58572c646a0bbcefcb065956fb3905d1d
|
c99342bb4ce22d842e806d9ebf2f9fcc761c05fb |
|
11-Dec-2017 |
Tobias Thierer <tobiast@google.com> |
Fix malformed Android change markers. These were not consistent with the style guide, as enforced by the libcore-compare-upstreams tool. Also improved the wording of a (previously malformed) comment in InMemoryCookieStore.removeAll(). Test: Checked that the libcore-compare-upstreams tool no longer complains about malformed change markers after this CL. Bug: 35910877 Change-Id: Ib83f819684ff309ea8e48d6767a84565739dff94
|
80339f4741bb174f9c6148b843ac0dcfc6422306 |
|
23-Nov-2017 |
Victor Chang <vichang@google.com> |
Sliently drop char 'b' or 'B' in j.t.SimpleDateFormat - Avoid IllegalArgumentException when locale data uses pattern with 'b'/'B' Sliently drop the char in pattern. - Parsing fails if SimpleDateFormat contains 'b' / 'B' symbols Bug: 68139386 Test: cts-tradefed run cts --module CtsLibcoreTestCases Change-Id: I5231d6ca7ab164db0ffb15647caad3046d921cde
|
43ac16dd655df5d01961a38ca7613cf078dad3ff |
|
27-Nov-2017 |
vichang <vichang@google.com> |
Revert "Sliently drop char 'b' or 'B' in j.t.SimpleDateFormat" This reverts commit 217fcbc435a35be0bade251da96a5ee7048095b3. Change-Id: Ieb0bd89bcd1f43f27dd0caf0d8208bf792b2e843
|
217fcbc435a35be0bade251da96a5ee7048095b3 |
|
23-Nov-2017 |
Victor Chang <vichang@google.com> |
Sliently drop char 'b' or 'B' in j.t.SimpleDateFormat - Avoid IllegalArgumentException when locale data uses pattern with 'b'/'B' Sliently drop the char in pattern. - Parsing fails if SimpleDateFormat contains 'b' / 'B' symbols Bug: 68139386 Test: libcore.java.text.SimpleDateFormatTest Change-Id: Ic9014371c0ca535d102ec492626c92c165c86539
|
edd9a36e405bff756edf1cc310ea00d45c15db0e |
|
29-Sep-2017 |
Joachim Sauer <jsauer@google.com> |
Fix API level in SimpleDateFormat documentation. SimpleDateFormat JavaDoc claims that Y and X are supported starting from API level 1, which is wrong, both of these pattern characters (and u, which is correctly marked) were added in API level 24. Bug: 66965622 Test: m (doc only change) (cherry picked from commit 4772860a6a2e4b4a64747c82a51a968ec08f7e13) Change-Id: I4c5f10bca8449fc0f39df8ec6bf26cf6186cb995
|
4772860a6a2e4b4a64747c82a51a968ec08f7e13 |
|
29-Sep-2017 |
Joachim Sauer <jsauer@google.com> |
Fix API level in SimpleDateFormat documentation. SimpleDateFormat JavaDoc claims that Y and X are supported starting from API level 1, which is wrong, both of these pattern characters (and u, which is correctly marked) were added in API level 24. Bug: 66965622 Test: m (doc only change) Change-Id: Idcd016a2e3b6bfdeaaa453fbd07a5fd9d6f6129c
|
d7c6839b0afae1fc8ad25d8495aac3b34daf12dd |
|
22-Sep-2017 |
Joachim Sauer <jsauer@google.com> |
Add change comments in SimpleDateFormat. Add Android-changed/-removed/-added comments where appropriate in java.text.SimpleDateFormat. Note that SimpleDateFormat is currently in a hybrid state where some upstream changes from 8u121-b30 are applied (mostly JavaDoc changes and other changes that don't effect behaviour) but the rest of the file is still at the level of 7u40 (notably, the additional OpenJDK 8 features have not been merged). Bug: 65669355 Bug: 66411240 Test: m (comment-only changes) Change-Id: I2d0ba1901a12dad3d3dfd4c80c0421ad1027399a
|
7355fec3783cb45ef6770ce7969c1319347c8b6a |
|
19-May-2017 |
Joachim Sauer <jsauer@google.com> |
Fix month and dayOfWeek names formatting. This fixes month of year (M/L) and day of week (E/c) formatting when useDateFormatSymbols is false. useDateFormatSymbols is set to true if one of those is true: - a DateFormatSymbol object was explicitly provided via a constructor - the calendar used is (exactly!) a java.util.GregorianCalendar or no locale is set. The underlying code isn't very clear, so it's quite possible that there are similar, related bugs still waiting in this code, but this fixes the concrete, reported issue while not regressing any existing tests. Bug: 38396219 Test: CstLibcoreTestCases Change-Id: If9b2a6df2fb8e9eb298e3e5628a0c16fdceee79c
|
242478c8a84d2fc9fd2e47f2b143622f1c9405db |
|
10-Feb-2017 |
Joachim Sauer <jsauer@google.com> |
Fix error index of unparsed timezone name. SimpleDateFormat.parse(String, ParsePosition) didn't report the correct error index when trying to parse a timezone name, instead errorIndex was always 0. This change ensures that the correct index is reported instead. Based on a changeset from openjdk8u121 changeset: 11038:e484c0558318 user: okutsu date: Thu Oct 01 15:16:35 2015 +0900 summary: 8081794: ParsePosition getErrorIndex returns 0 for TimeZone parsing problem Bug: 35134326 Test: libcore.java.text.SimpleDateFormatTest Change-Id: Iaafdf9315c070d28dfcbc30e016daf16c8d58a7a
|
d0c91f2e5d28e52c82b5a6443d6ed8327493ff82 |
|
30-Sep-2016 |
Neil Fuller <nfuller@google.com> |
Remove DateFormat time pattern caching This change removes pattern string caching from the SimpleDateFormat constructor only used by DateFormat.getInstance(). Before this change, the LocaleData.getTimeFormat(int) method that is used to populate the cached data can return different information for SHORT and MEDIUM times based on the DateFormat.is24Hour setting and so the results are not safe to cache: if the user modifies their "use 24-hour format" setting and the data is already cached the old pattern was persisted forever. This was also causing various CTS tests to fail if the device had the "use 24-hour format" setting on. For example: libcore.java.text.OldDateFormatTest org.apache.harmony.tests.java.text.MessageFormatTest org.apache.harmony.tests.java.util.DateTest Callers of java.text.DateFormat.get(int, int, int, Locale) are affected. In practice that means DateFormat.getTimeInstance() / getTimeInstance(int) and getTimeInstance(int, Locale). Indirect callers in the Android framework include: android.text.format.DateUtils android.text.format.DateFormat android.widget.DigitalClock java.text.MessageFormat This change has a small negative affect on performance, but not a significant one: obtaining a DateFormat via DateFormat.getTimeInstance() goes from ~28us to ~33us on an Angler device. Full results for the benchmarks included: Before: benchmarkMethod=timeGetDateTimeInstance runtime(ns): min=27518.68, 1st qu.=28461.12, median=28775.87, mean=28732.44, 3rd qu.=29235.59, max=29320.80 runtime(ns): min=28599.17, 1st qu.=28769.57, median=29277.13, mean=29682.69, 3rd qu.=29824.08, max=33419.06 benchmarkMethod=timeGetDateTimeInstance_multiple runtime(ns): min=108667.38, 1st qu.=110223.70, median=111547.98, mean=112173.89, 3rd qu.=113748.88, max=118091.12 runtime(ns): min=102995.66, 1st qu.=105045.16, median=108558.77, mean=108817.18, 3rd qu.=111677.65, max=115886.11 After: benchmarkMethod=timeGetDateTimeInstance runtime(ns): min=31365.39, 1st qu.=32904.01, median=33303.47, mean=33244.55, 3rd qu.=33983.32, max=34052.99 runtime(ns): min=31785.28, 1st qu.=32921.68, median=33364.01, mean=33531.03, 3rd qu.=34301.06, max=35031.33 benchmarkMethod=timeGetDateTimeInstance_multiple runtime(ns): min=126834.48, 1st qu.=128605.17, median=130069.44, mean=131157.63, 3rd qu.=134095.26, max=138164.92 runtime(ns): min=124618.08, 1st qu.=126097.91, median=130190.93, mean=130027.17, 3rd qu.=131991.56, max=140283.06 Bug: 31762542 Test: Ran CtsLibcoreTestCases with the "use 24-hour format" on and off (cherry picked from commit 6fdc0bf198c455cbe73ecf825bd0f8f985481066) Change-Id: I522782222d4b7f7356b9d26060ce87f3cbf8e674
|
6fdc0bf198c455cbe73ecf825bd0f8f985481066 |
|
30-Sep-2016 |
Neil Fuller <nfuller@google.com> |
Remove DateFormat time pattern caching This change removes pattern string caching from the SimpleDateFormat constructor only used by DateFormat.getInstance(). Before this change, the LocaleData.getTimeFormat(int) method that is used to populate the cached data can return different information for SHORT and MEDIUM times based on the DateFormat.is24Hour setting and so the results are not safe to cache: if the user modifies their "use 24-hour format" setting and the data is already cached the old pattern was persisted forever. This was also causing various CTS tests to fail if the device had the "use 24-hour format" setting on. For example: libcore.java.text.OldDateFormatTest org.apache.harmony.tests.java.text.MessageFormatTest org.apache.harmony.tests.java.util.DateTest Callers of java.text.DateFormat.get(int, int, int, Locale) are affected. In practice that means DateFormat.getTimeInstance() / getTimeInstance(int) and getTimeInstance(int, Locale). Indirect callers in the Android framework include: android.text.format.DateUtils android.text.format.DateFormat android.widget.DigitalClock java.text.MessageFormat This change has a small negative affect on performance, but not a significant one: obtaining a DateFormat via DateFormat.getTimeInstance() goes from ~28us to ~33us on an Angler device. Full results for the benchmarks included: Before: benchmarkMethod=timeGetDateTimeInstance runtime(ns): min=27518.68, 1st qu.=28461.12, median=28775.87, mean=28732.44, 3rd qu.=29235.59, max=29320.80 runtime(ns): min=28599.17, 1st qu.=28769.57, median=29277.13, mean=29682.69, 3rd qu.=29824.08, max=33419.06 benchmarkMethod=timeGetDateTimeInstance_multiple runtime(ns): min=108667.38, 1st qu.=110223.70, median=111547.98, mean=112173.89, 3rd qu.=113748.88, max=118091.12 runtime(ns): min=102995.66, 1st qu.=105045.16, median=108558.77, mean=108817.18, 3rd qu.=111677.65, max=115886.11 After: benchmarkMethod=timeGetDateTimeInstance runtime(ns): min=31365.39, 1st qu.=32904.01, median=33303.47, mean=33244.55, 3rd qu.=33983.32, max=34052.99 runtime(ns): min=31785.28, 1st qu.=32921.68, median=33364.01, mean=33531.03, 3rd qu.=34301.06, max=35031.33 benchmarkMethod=timeGetDateTimeInstance_multiple runtime(ns): min=126834.48, 1st qu.=128605.17, median=130069.44, mean=131157.63, 3rd qu.=134095.26, max=138164.92 runtime(ns): min=124618.08, 1st qu.=126097.91, median=130190.93, mean=130027.17, 3rd qu.=131991.56, max=140283.06 Bug: 31762542 Test: Ran CtsLibcoreTestCases with the "use 24-hour format" on and off Change-Id: I02798e8fcd2ed5f7625a32261112560b5d9b18f3
|
4947038a7acb466855746df19d41ef26be507aa4 |
|
15-Jul-2016 |
Joachim Sauer <jsauer@google.com> |
Delegate time zone names handling to ICU in SDF. Delegate parsing and formatting time zone names to the relevant ICU code (android.icu.text.TimeZoneNames). This fixes an issue where the cache of time zone names was time dependent. The old code that uses DateFormatSymbols.getZoneStrings() for parsing and formatting is still used as a fallback, but it's only used if the DateFormatSymbols.setZoneStrings() has been called explicitly. Performance of this code is between ~40-105% of the old code, depending on the exact use case (Measured with SimpleDateFormatBenchmark, times in ns per iteration on a bullhead, with cpu frequencies locked to 864000): Before After time_createAndParseWithTimeZoneLong 105,195 172,892 time_createAndParseWithTimeZoneShort 96,313 189,077 time_createFormatWithTimeZone 26,551 25,351 time_formatWithTimeZoneLong 10,700 13,151 time_formatWithTimeZoneShort 10,872 13,352 time_parseWithTimeZoneLong 57,348 101,426 time_parseWithTimeZoneShort 48,323 114,452 time_parseWithoutTimeZone 15,293 16,128 This change slightly affects how time zone names are parsed and formatted: * When formatting a date, we now use time zone name information that is accurate for the time we format. Previously we implicitly used the time at which the time zone name data was cached (which happened to be whatever the RTC was at boot time for the root, US and default locale). While this may result in differences in how past dates are formatted (specifically when formatting a date that is before the last time a time zone name changed), the new behaviour is definitely more correct than the old one. * When parsing a date, we now use the time zone name information that is accurate at time the parse happens (according to the RTC). This means that some older dates might not round-trip correctly (because the zone name information used for parsing and formatting is different). Previously we used the same time as for formatting (i.e. some arbitrary time when the zone names were cached). Test: libcore/run-libcore-tests libcore.java.text org.apache.harmony.tests.java.text Bug: 20879084 Change-Id: Id9f70acad60d97b9879df14b5b5de6e89b209de3
|
a17c83ea5f83606615aed6a86cbb8a8ad8444723 |
|
23-Sep-2016 |
Przemyslaw Szczepaniak <pszczepaniak@google.com> |
Patterns API column for j.t.SimpleDateFormat javadoc Since from 24+ we support 'u' pattern which was not supported earlier, I've extended javadoc with Supported API column. Added tests for the 'u' pattern. Test: make docs, vogat SimpleDataFormatTest run Bug: 31480620 Change-Id: I9dbb0ad5c978f8ea5b9b8444c5e06e8d91d2f5ad
|
82c413526cc241290cc69170f28cac5213cf74ed |
|
25-Jul-2016 |
Joachim Sauer <jsauer@google.com> |
Fix standalone weekday parsing. Parsing standalone weekdays ('cccc') was treated the same way as "regular" weekdays ('EEEE') since N. This ensures that the correct names are used for parsing. This bug doesn't have any effect in most locales, as most either don't have a separate standalone version of the weekday or they only differ in casing. Also added a test for formatting standalone weekdays. It wasn't broken but also wasn't tested before. Tested: libcore/run-libcore-tests libcore.java.text.SimpleDateFormatTest org.apache.harmony.tests.java.text.SimpleDateFormatTest Bug: 30323478 (cherry picked from commit 91116215bcb3e903fc334eaf23898b0d8ece6924) Note that git merged the change wrong and it was manually corrected (passing "true" to parseWeekday for the standalone case). Change-Id: I7fff3d36b3f3838d5883341ed5eaf3488906f152
|
91116215bcb3e903fc334eaf23898b0d8ece6924 |
|
25-Jul-2016 |
Joachim Sauer <jsauer@google.com> |
Fix standalone weekday parsing. Parsing standalone weekdays ('cccc') was treated the same way as "regular" weekdays ('EEEE') since N. This ensures that the correct names are used for parsing. This bug doesn't have any effect in most locales, as most either don't have a separate standalone version of the weekday or they only differ in casing. Also added a test for formatting standalone weekdays. It wasn't broken but also wasn't tested before. Change-Id: Ia3bd2832d1c33c37de5c0a640f7e8344d9bc009c Tested: libcore/run-libcore-tests libcore.java.text.SimpleDateFormatTest org.apache.harmony.tests.java.text.SimpleDateFormatTest Bug: 30323478
|
cdde6627c3b5fe67e086043cb789e88110a38028 |
|
18-Jul-2016 |
Joachim Sauer <jsauer@google.com> |
Fix time zone formatting with setZoneStrings(). User-defined time zone strings (using DateFormatSymbols.setZoneStrings()) were ignored since N. This make sure that formatting time zone names takes into account any values specified by the user. Also add a test to ensure that malformed arrays in setZoneStrings() are correctly rejected. Test: run cts -m CtsLibcoreTestCases --module-arg "CtsLibcoreTestCases:include-filter:libcore.java.text,org.apache.harmony.tests.java.text" Bug: 30155437 (cherry picked from commit d8bef3c23bf1851242cc2dc189edaa544eeabe58) Change-Id: Ie89d3a56c8a91f0d6d12da26490e16ed46095a0a
|
d8bef3c23bf1851242cc2dc189edaa544eeabe58 |
|
18-Jul-2016 |
Joachim Sauer <jsauer@google.com> |
Fix time zone formatting with setZoneStrings(). User-defined time zone strings (using DateFormatSymbols.setZoneStrings()) were ignored since N. This make sure that formatting time zone names takes into account any values specified by the user. Also add a test to ensure that malformed arrays in setZoneStrings() are correctly rejected. Bug: 30155437 Change-Id: I8881b89008e36b1c79e3b41bb6c485a80cc39af2
|
49965c1dc9da104344f4893a05e45795a5740d20 |
|
30-Jun-2016 |
Ganesh Mahendran <opensource.ganesh@gmail.com> |
remove x attribute of java file java file does not need x attribute. This patch removes it. Change-Id: I2a7170d99f4bee7a7b819621c84dd197ded37fa2 Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
|
af18bc9973eca35fc0d4db6e240323f38c9d7a91 |
|
06-Jul-2016 |
Paul Duffin <paulduffin@google.com> |
Apply JDK 8 refactorings that don't change behavior of SimpleDateFormat In addition to behavioral changes in JDK 8 there are some refactorings that do not change the behavior but which do contribute to differences with Android. This change applies the refactorings that affect SimpleDateFormat/DateFormatSymbols. * JDK 8 adds support for standalone month format but the DateFormatSymbols constant is PATTERN_MONTH_STANDALONE while the Android version is PATTERN_STANDALONE_MONTH. * A variable has been renamed from compiledPattern to compiledCode. Bug: 29352743 Test: Built and run SimpleDateFormatTest Change-Id: Ideb31998d03e1361cea4c914c9eed13118cade0f
|
6e42190c7f7d7cf3d8b787c918de0d797c6ddbba |
|
23-Jun-2016 |
Paul Duffin <paulduffin@google.com> |
Applies non-functional changes from 7u40 - 8u60 These changes cover: * JavaDoc improvements. * Internal use of generics. * Improve diagnostics for some internal errors. * Add annotations, e.g. @Override, @SuppressWarnings where necessary. * Formatting changes. * Removing unnecessary modifiers, e.g. public on package private classes, final on private methods, etc. * Copyright updates. Bug: 29352743 Test: flashed onto device and made sure that it comes up properly, ran make docs and checked the output of a few representative changes. Change-Id: I731c556d7d4401e2d571ca9b2a69e63b29ef89e1
|
4c8d6d2a84cffba9a34ea03d534d77027fb1974e |
|
22-Jun-2016 |
Paul Duffin <paulduffin@google.com> |
Revert some non-functional changes to source While integrating OpenJDK some non-functional changes were made to the source in order to improve consistency and formatting. Unfortunately, these produce conflicts when applying upstream patches making it more difficult to see the functional changes. On balance the improvement in readability and consistency is not worth the cost of the upgrade so this change reverts those changes that caused conflicts to simplify the task of upgrading. Most of the changes are localized and is easy to see that they have no impact on functionality, the exceptions are: CollationElementIterator - getOffset() method moved to the same position as it had in 7u40. Collator - move icuColl, constructors, getAvailableLocales(), and clone() members to the same position as they had in 7u40. SimpleDateFormat - move cases for STANDALONE options after the non-standalone ones to match the order in 7u40. Bug: 29352743 Change-Id: Ifc6b0d2455e6330ddc7433d8c39b8f0dcc18f8b3
|
08db36e9a34896135e8b0883f65bde5b86ee90e6 |
|
25-Mar-2016 |
Narayan Kamath <narayan@google.com> |
SimpleDateFormat: Reset timezone after parse. This reverts to Android M behaviour, which happens to be more consistent and predictable. bug: 27760434 (cherry picked from commit 2015e08d682be61dacd76c51bb0345f357fc4e96) Change-Id: I67789bbc6d98c6a1d5816a119e3d9a379ff90ed6
|
2015e08d682be61dacd76c51bb0345f357fc4e96 |
|
25-Mar-2016 |
Narayan Kamath <narayan@google.com> |
SimpleDateFormat: Reset timezone after parse. This reverts to Android M behaviour, which happens to be more consistent and predictable. bug: 27760434 Change-Id: I8c26ff58e89e8bba64bf0f244469db5e24eec982
|
d06c9ff1e64308978a6db2135d744613e396b65e |
|
18-Jan-2016 |
Narayan Kamath <narayan@google.com> |
Make SDF slightly more lenient about parsing zone strings. We tolerate a colon even formats that don't specify it. Also, the existing code for verifying that a colon exists has been rewritten for clarity. bug: 26426526 Change-Id: Iea4ef6be0174a86d31df7ad9b6636ef904991cea
|
2c87ad3a45cecf9e344487cad1abfdebe79f2c7c |
|
21-Dec-2015 |
Narayan Kamath <narayan@google.com> |
Update file headers. Change-Id: I8149f41585768a1a4b72ab7bb4a1452376c05cc2
|
afe86efb5d4b237c50df82b7dcb581d4d75b1132 |
|
01-Dec-2015 |
Narayan Kamath <narayan@google.com> |
More UTS#35 conformance. 'S' must be interpreted as a fractional second field. While it is loosely equivalent to milliseconds, it is not always so. For instance: "11.789045" seconds is 11 seconds and ~789 (not 789045) milliseconds. "11.79" seconds is 11 seconds and 790 (not 79) milliseconds. This change makes sure we deal with these values correctly. The behaviour for count === 3 (SSS, eg. "11.564" seconds) is unchanged. bug: 25863120 Change-Id: Idac94d7aafcdbdcd83ac561cf5895e5890cf8a56
|
00617c74e1f95fbe088f078341d607132575b0d6 |
|
02-Dec-2015 |
Narayan Kamath <narayan@google.com> |
Deal with CLDR abbreviations correctly. CLDR data for some locales contains abbreviated forms that end with a period ("Aug." for example). We should attempt to match those even when the input date doesn't end with a period. bug: 25863120 Change-Id: Id8cb14631b766f8286862488878ed11f359a3f00
|
d6c54ba7af74286d2e310703a4aa2c924ec85c99 |
|
01-Dec-2015 |
Narayan Kamath <narayan@google.com> |
Implement more of the UTS#35 spec. - Support for "tiny" weekdays and months (EEEEE and MMMMM) - Support for standalone weekdays and months. - Proper support for the 'Z' specifier (RFC-822 timezones) Also fixes a bug in how date+time patterns were generated and makes several unit tests clearer by using assertEquals instead of assertTrue. Fixes most of our DateFormat / SimpleDateFormat related tests. bug: 25859156 bug: 25863120 Change-Id: Ieec88a29ddbd8ea8076e8913dfad1330d7ad4c25
|
3822402ba5642bd60d5cd6305ceee73a613b4bc8 |
|
26-Nov-2015 |
Narayan Kamath <narayan@google.com> |
SimpleDateFormat: Emulate support for 'L' and 'c' format specifiers. It looks like we'd partially implemented this already and this change fills in the missing pieces. This is a temporary change because all of this will be replaced with a proper ICU4J based formatter in short order. bug: 25859156 Change-Id: I316a37b7c4ad5fb55ed592307d0683de85c14670
|
b7554f779d330037a5cf591fcc8be73db73a0384 |
|
07-Sep-2015 |
Narayan Kamath <narayan@google.com> |
Pretend to support 'L' and 'c' format specifiers. Temporary fixes for Clocks / Maps. Proper support for standalone week and month will be implemented in a future change. Change-Id: I58e2cdb7c43978423f68f2d98d43341a3d9c748e
|
9c853c5b9ebbb0ef60a013ae10ee411d70dfa832 |
|
18-Feb-2015 |
Piotr Jastrzebski <haaawk@google.com> |
Use OpenJdk implementations of java.text.* - LocaleInternalsTest has been disabled since it depends on internal implementation details. - Collator: Use libcore's RuleBasedCollatorICU to fetch collator rules instead of sun.misc.resources.LocaleData & friends. - DateFormat: Add support for set24HourTimePref (not wired up yet). - DateFormatSymbols : Use libcore's LocaleData & TimeZoneNames classes internally. - NumberFormat: Use libcore's LocaleData. - Drop support for SCIENTIFICSTYLE (we should re-enable this at some point ?). - SimpleDateFormat : Don't reject the format specifiers for standalone weekday and friends. We'll need to switch over to using ICU4J formatters at some point. - Calendar : Use GregorianCalendar only. - TimeZone : Use TimeZoneNames to access time zone names. Change-Id: I4a2866904d4f2f39f0793154d9aad7f109da3b5a
|
51b1b6997fd3f980076b8081f7f1165ccc2a4008 |
|
16-Feb-2015 |
Piotr Jastrzebski <haaawk@google.com> |
Initial import of OpenJdk files. Create new libcore/ojluni directory with src/main/java and src/main/native subdirectiories. Build ojluni into core-oj jar. Use openjdk classes from java.awt.font package. Copy all files from jdk/src/share/classes and jdk/src/solaris/classes directories in openjdk into libcore/ojluni/src/main/java. Copy following native files from openjdk to libcore/ojluni/src/main/native: jdk/src/solaris/native/java/io/canonicalize_md.c build/linux-amd64/include/classfile_constants.h jdk/src/share/native/java/net/DatagramPacket.c jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c jdk/src/share/native/java/lang/Double.c jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c jdk/src/solaris/native/java/io/FileDescriptor_md.c jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c jdk/src/share/native/java/io/FileInputStream.c jdk/src/solaris/native/sun/nio/ch/FileKey.c jdk/src/solaris/native/java/io/FileOutputStream_md.c jdk/src/solaris/native/java/io/FileSystem_md.c jdk/src/share/native/java/lang/Float.c jdk/src/share/native/java/net/Inet4Address.c jdk/src/solaris/native/java/net/Inet4AddressImpl.c jdk/src/share/native/java/net/Inet6Address.c jdk/src/solaris/native/java/net/Inet6AddressImpl.c jdk/src/share/native/java/net/InetAddress.c jdk/src/solaris/native/java/net/InetAddressImplFactory.c jdk/src/share/native/java/io/io_util.c jdk/src/solaris/native/sun/nio/ch/IOUtil.c jdk/src/share/native/java/io/io_util.h jdk/src/solaris/native/java/io/io_util_md.c jdk/src/solaris/native/java/io/io_util_md.h build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/java_io_FileDescriptor.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_FileInputStream.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_FileOutputStream.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_FileSystem.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_ObjectStreamClass.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_UnixFileSystem.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Double.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Float.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Integer.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Long.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Runtime.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Shutdown.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_StrictMath.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_String.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_System.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Thread.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Throwable.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_DatagramPacket.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_Inet4Address.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_Inet4AddressImpl.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_Inet6Address.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_Inet6AddressImpl.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_InetAddress.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_InetAddressImplFactory.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_NetworkInterface.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_PlainDatagramSocketImpl.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_PlainSocketImpl.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_SocketInputStream.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_SocketOptions.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_SocketOutputStream.h jdk/src/share/native/java/lang/java_props.h jdk/src/solaris/native/java/lang/java_props_md.c jdk/src/share/native/java/util/zip/Adler32.c as java_util_zip_Adler32.c jdk/src/share/native/java/util/zip/CRC32.c as java_util_zip_CRC32.c build/linux-amd64/tmp/sun/java.util.zip/zip/CClassHeaders/java_util_zip_CRC32.h jdk/src/share/native/java/util/zip/Deflater.c as java_util_zip_Deflater.c build/linux-amd64/tmp/sun/java.util.zip/zip/CClassHeaders/java_util_zip_Deflater.h jdk/src/share/native/java/util/zip/Inflater.c as java_util_zip_Inflater.c build/linux-amd64/tmp/sun/java.util.zip/zip/CClassHeaders/java_util_zip_Inflater.h jdk/src/share/native/java/util/zip/ZipFile.c as java_util_zip_ZipFile.c build/linux-amd64/tmp/sun/java.util.zip/zip/CClassHeaders/java_util_zip_ZipFile.h jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h jdk/src/share/native/common/jlong.h jdk/src/solaris/native/common/jlong_md.h jdk/src/share/native/common/jni_util.c jdk/src/share/native/common/jni_util.h jdk/src/solaris/native/common/jni_util_md.c jdk/src/share/javavm/export/jvm.h jdk/src/solaris/javavm/export/jvm_md.h jdk/src/solaris/native/java/net/linux_close.c jdk/src/share/native/sun/misc/NativeSignalHandler.c jdk/src/solaris/native/sun/nio/ch/NativeThread.c jdk/src/share/native/java/net/net_util.c jdk/src/share/native/java/net/net_util.h jdk/src/solaris/native/java/net/net_util_md.c jdk/src/solaris/native/java/net/net_util_md.h jdk/src/solaris/native/java/net/NetworkInterface.c jdk/src/share/native/sun/nio/ch/nio.h jdk/src/solaris/native/sun/nio/ch/nio_util.h jdk/src/share/native/java/io/ObjectStreamClass.c jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c jdk/src/solaris/native/java/net/PlainSocketImpl.c jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c jdk/src/share/native/java/lang/Runtime.c jdk/src/share/native/java/lang/Shutdown.c jdk/src/share/native/sun/misc/Signal.c jdk/src/solaris/native/java/net/SocketInputStream.c jdk/src/solaris/native/java/net/SocketOutputStream.c jdk/src/share/native/java/lang/StrictMath.c jdk/src/share/native/java/lang/String.c build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/sun_misc_NativeSignalHandler.h build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/sun_misc_Signal.h build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/sun_net_spi_DefaultProxySelector.h build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_FileChannelImpl.h build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_FileDispatcherImpl.h build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_FileKey.h build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_IOStatus.h build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_IOUtil.h build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_NativeThread.h jdk/src/share/native/java/lang/System.c jdk/src/share/native/java/lang/Thread.c jdk/src/share/native/java/lang/Throwable.c jdk/src/solaris/native/java/io/UnixFileSystem_md.c jdk/src/solaris/native/java/lang/UNIXProcess_md.c jdk/src/share/native/java/util/zip/zip_util.c jdk/src/share/native/java/util/zip/zip_util.h Change-Id: Ib237df4e1b7b5b4d9f12e74d189e6ec9eed3c31d
|