ICU-21307 Java 7 compatibility support in ULocale.java
Recent code changes introduced String#join(...) method, which is available in Java 8 or newer release. We still need to support Java 7 as minimum runtime, we need to replace the method call with equivalent code. I added Utility#joinStrings(...) as temporary alternative until we change minimum Java version to 8 or later.
Jeff Genovy [Wed, 23 Sep 2020 20:21:16 +0000 (13:21 -0700)]
ICU-13845 Windows timezone detection: When DST is off, map to an Etc/GMT+-hh zone.
The Windows 'Date and Time' Control Panel has a setting for "Automatically
adjust clock for DST". When this setting is manually unchecked, the DST
setting is considered OFF, and the clock does not adjust for DST.
This change detects when the setting is OFF and uses the non-DST offset
to map to an Etc/GMT+-hh zone.
ICU-21248 Adds line ending check to Travis CI check. The eol check fits
quite well into what the script is doing already.
Note that one file, 'testrunner.cmd', contains \r, which seems to
be acceptable since it is a Windows file.
Jacob [Sat, 12 Sep 2020 22:36:05 +0000 (18:36 -0400)]
ICU-21282 Fixup date patterns and date field symbols display
No content changes. This make the display of date patterns, date field symbols, and skeletons consistent.
- Date field symbols are in a code block (e.g. `y` or `yyyy`)
- Date patterns are quoted in a code block (e.g. `"y"` or `"MMMM d 'at' h:mm a"`)
- Skeletons are the same as date patterns (e.g. `"MMMMdjmm"`)
- Strings that might be the result of a date pattern are quoted (e.g. "April 2 at 5:00 PM")
Thus `"y"` denotes the date pattern containing the date field symbol `y`
ICU-21028 Modifies ICU data generator so that the CLDR version is
no longer added to the .txt data files with the exception of the
root.txt files. This will drastically limit the number of changed
files during a version upgrade because the version change is the
only change in many of the data files.
ICU-21259 Adds a filter to pseudolocale generator to switch a particular
datetime pattern item from 12 hrs to 24 hrs format to prevent a unit
test failure.
ICU-21259 Disables pseudolocale generation in ICU data generation script.
Should not have stayed enabled in the earlier commit.
ICU-21259 Fix indents.
ICU-21259 Modify changes according to review feedback.
Steven R. Loomis [Tue, 15 Sep 2020 17:19:48 +0000 (12:19 -0500)]
ICU-21251 release icu4j.jar/utilities.jar to GH Maven
- on a release (created from Github), publish to
<https://github.com/unicode-org/icu/packages> as
1. icu4j-for-cldr
2. utilities-for-cldr
- also fix a doc bug in DecimalFormat
- this is intended for CLDR use.
- a tag such as 'cldr/2019-09-15' will turn into a
maven version '68.1-SNAPSHOT-cldr-2019-09-15'
ICU-20568 Add .unit().usage() support to ICU4J NumberFormatter (2/2)
* Throw UnsupportedOperationException for "unsanctioned units"
* Deal with the parent issue for LongNameMultiplexer
* Fix NullPointerException: UnitConversionHandler.processQuantity must
call fParent.processQuantity
* toSkeleton not supported for not-built-in units
* Add and use interface
LongNameMultiplexer.ParentlessMicroPropsGenerator
* Match up C++ and Java unit tests in NumberFormatterApiTest.java
* Permit user-override of precision() for usage(), closes icu-units#95
* Use BogusRounder to propagate mathContext.
* Port C++ change from PR #1322, commit c84ded050a, to Java.
* Test the usage-without-unit error. Document it in
NumberFormatterSettings.java
* General review and corrections.
ICU-21249 Adds !UCONFIG_NO_BREAK_ITERATION around selected test data items.
The corresponding code that implements the feature under test is likewise
enclosed.
Frank Tang [Thu, 17 Sep 2020 03:22:51 +0000 (20:22 -0700)]
ICU-21283 Fix Java for calendar bugs
This is the java port of ICU-21043 (for C++)
This PR fixes
ICU-21043 Erroneous date display in indian calendar of all dates prior to 0001-01-01.
ICU-21044 Hebrew Calendar calculation is incorrect when the year < 1
ICU-21045 Erroneous date display in islamic and islamic-rgsa calendars of all dates prior to 0622-07-18.
ICU-21046 Erroneous date display in islamic-umalqura calendar of all dates prior to -195366-07-23.
The problem in the IndianCalendarl is
ICU-21043 the gregorian/julain convesion is wrong. Swith to use the
calculation function in the Calendar class.
The problem in the HebrewCalendar is
ICU-21044 the use of bulit in / is wrong when the year or month could be < 1.
The problem in the IslamicCalendar is
ICU-21045: The math of % negative number for year and month is wrong.
Also add tests to exhaust test 8000 years for all calendar. In quick
mode, only test 2.5 years.
ICU-20568 Have macrosToMicroGenerator do input unit calculation.
This moves input unit calculation out of UnitConversionHandler making
it simpler and clearer, and localises the "MacroProps interpretation"
work in macrosToMicroGenerator, where it belongs.
ICU-21249 Adds #if !UCONFIG_NO_FORMATTING around all code in number_symbolswrapper.cpp.
If UCONFIG_NO_FORMATTING is set to 1 in uconfig.h nothing in
number_symbolswrapper.cpp compiles. Note, for example, that the entirety
of the included numberformatter.h header file is inclosed in
!UCONFIG_NO_FORMATTING.
More commits:
- Reorder numbertest_api.cpp tests for consistent order.
- NumberFormatterApiTest: fold unitPipeline() into unitCompoundMeasure()
- Add some 'template class' instantiations for MSVC.
- Make trimField handle all whitespace, improve test messages
- Drop templated 'appendAll': it requires copy constructor
- Add protected MaybeStackArray::copyFrom()
- Add TODO(icu-units#67) and commented-out test case: use kUndefinedField for now
- Provide correct output order for units like "inch-and-foot"
- MSVC: export MaybeStackVector<MeasureUnit>
- Code review feedback: dependencies.txt and doc comments
- Consistent naming for code files: units_*