Commit graph

20 commits

Author SHA1 Message Date
Frank Tang
73956e9cf3 ICU-22736 Fix Persian calendar
ICU-22736 Add tests for java and make correction

Update icu4c/source/i18n/persncal.cpp

Co-authored-by: Markus Scherer <markus.icu@gmail.com>
2024-12-06 16:24:57 -08:00
Frank Tang
ec800e7407 ICU-22633 Return error if era is out of range 2024-02-27 10:56:28 -08:00
Frank Tang
cdab88ff4e ICU-22513 Return error if days is too large in IslamicUmalquraCalendar
If the year is too large it may overflow the int32_t variable and cause
slow or infinity loop, return error if the year is too large that the
conversion to day may overflow int32_t. Limit the value to max value of
int32_t divide by 400.
2023-10-26 17:09:41 -07:00
Markus Scherer
b6dcc95d3c ICU-21833 remove redundant void parameter lists
See #2351
2023-03-02 09:31:57 -08:00
Peter Varga
80d42a13fc ICU-21734 Add missing overrides in tests 2021-09-07 13:56:33 -07:00
Frank Tang
35dfdf1d02 ICU-21043 Fix calendar problems
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.
2020-09-10 00:21:18 -07:00
Peter Edberg
9a7bf5cea8 ICU-20441 force Gannen use for ja@calendar=japanese non-numeric formats if no override (#474) 2019-02-21 19:26:52 -08:00
Andy Heninger
242e02c388 ICU-12764 icu4c utf-8 source files, update Copyright notices.
X-SVN-Rev: 39583
2017-01-20 00:20:31 +00:00
Michael Ow
61607c2773 ICU-12564 Update copyright notice in trunk
X-SVN-Rev: 38848
2016-06-15 18:58:17 +00:00
Yoshito Umaoka
00ca13e126 ICU-12564 Reverted r38761 and r38762, because we want to prepend the Unicode copyright for existing source files, instead of replacing copyright comments.
X-SVN-Rev: 38776
2016-05-31 21:45:07 +00:00
Michael Ow
c9f199a30f ICU-12564 Update copyright notice in ICU4C
X-SVN-Rev: 38761
2016-05-26 22:32:17 +00:00
Steven R. Loomis
398b2aafc0 ICU-4567 taiwan calendar for C/C++
X-SVN-Rev: 22403
2007-08-16 18:40:18 +00:00
Steven R. Loomis
9f4a4ce5e0 ICU-4567 initial taiwan calendar support
X-SVN-Rev: 21854
2007-06-29 16:56:34 +00:00
Steven R. Loomis
114486b002 ICU-5655 Integrate Mehran Mehr's Persian Calendar support
X-SVN-Rev: 21293
2007-03-19 17:33:20 +00:00
Steven R. Loomis
db78a1eda9 ICU-3860 update test to pass m/d/y when testing omitted Japanese era
X-SVN-Rev: 18086
2005-06-29 16:34:25 +00:00
Steven R. Loomis
730163b0ca ICU-2424 new test: calendar case test (port from Java)
X-SVN-Rev: 13988
2003-12-04 00:47:56 +00:00
Steven R. Loomis
064c552148 ICU-2424 islamic cal & astronomy tests
X-SVN-Rev: 13849
2003-11-24 21:36:01 +00:00
Steven R. Loomis
0178f18066 ICU-2436 updated testing for J and B calendars
X-SVN-Rev: 12140
2003-05-28 05:41:29 +00:00
Steven R. Loomis
f2e4031b0c ICU-2436 Japanese Calendar implementation, other fixes (multi calendar)
X-SVN-Rev: 12105
2003-05-25 07:12:19 +00:00
Steven R. Loomis
e1e5ae9358 ICU-2436 multiple calendars (Buddhist)
X-SVN-Rev: 11973
2003-05-16 21:58:37 +00:00