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 indiancal.cpp is
* ICU-21043 the gregorian/julain convesion is wrong. Swith to use
i18n/gregoimp.h fix the problem.
The problem in the hebrwcal.cpp is
* ICU-21044 Use ClockMath::floorDivid to replace x / y for x maybe < 0
also need to fix incorrect value in test file
The problem in the islamcal.cpp:
* ICU-21045: The math of % negative number for year and month is wrong.
* ICU-21046: Not use int64_t methods and caused int32_t overflow while the year is a
huge negative number. Cast to int64_t to force using the int64_t version
for the math fix the problem.
Also add tests to exhaust test 8000 years for all calendar. In quick
mode, only test 2.5 years.
Switch to 0-based month. fix TZ for test.
These two calls to uloc_getKeywordValue() write to the buffer "id" which
then immediately after is overwritten by calls to idForLocale() so they
can simply be removed without any loss of functionality.
This eliminates the need for a scratch buffer in Locale::getKeywordValue()
and also the need for counting bytes required in uloc_getKeywordValue(),
something that ByteSink will now handle correctly.
Move them UniqueCharStrings and CharStringMap from
loclikelysubtags.{h,cpp} to separate header files
so so we can reuse them to implement
https://github.com/unicode-org/icu/pull/1254
Change to use the Windows 10 SDK for Win32 (Win7) builds on the VS2019 ADO images.
The Windows 10 SDK is backwards compatible to Windows 7, if WINVER and
_WIN32_WINNT are set before compiling.
Clean up the vcxproj files from VC7.1
The one single caller of _getVariantEx() is _getVariant() and this in
turn only has 3 callers, one of which is commented out (so it can be
deleted), one of which doesn't actually do anything (so it too can be
deleted) and one which can be replaced by inlining the use of
CheckedArrayByteSink.
This also allows _getVariantEx() to be renamed to _getVariant() as it's
the only such function left now.
Fix kilogram parsing: ignore 'kilogram' as a stem, we have 'gram'.
Failures in the added unit test before the fix: withSIPrefix resulted
in 'microkilogram', and kilogram's prefix was considered to be
"ONE" (i.e. 10^0).
The complicated buffer allocation code is inherited from times past but
no longer serves any purpose, it's now possible to instead simply call
the CharString copy constructor.
By always calling the dynamic memory allocation implementation directly
instead, the fixed memory buffer boundary gets pushed one step further
towards the edges.
By always calling the dynamic memory allocation implementation directly
instead, the fixed memory buffer boundary gets pushed one step further
towards the edges.