832 Commits

Author SHA1 Message Date
Philip Chimento
883d4ece0b Expand current lunisolar leap months difference
This takes the current 'until-across-lunisolar-leap-months.js' which
didn't test much of anything too carefully, and expands it to cover
comprehensive date difference arithmetic across and including leap
months in the Chinese and Dangi calendars, for PlainDate, PlainDateTime,
and ZonedDateTime.

Hebrew calendar arithmetic will follow in a different PR.
2025-11-11 16:42:31 +01:00
Philip Chimento
8a3e85e099 Intl Era Monthcode: Add tests for Hebrew lunisolar leap month difference
Similar to #4652 - note that the expected results are different for the
cases labeled "exhibits calendar-specific constraining"! Covers date
difference arithmetic across and including leap months in the Hebrew
calendar, for PlainDate, PlainDateTime, and ZonedDateTime.
2025-11-11 16:34:33 +01:00
Jesse Alama
48c56238b6 Intl Era Monthcode: Era boundary tests for roc calendar
Co-Authored-By: Philip Chimento <pchimento@igalia.com>
2025-11-11 16:08:22 +01:00
Jesse Alama
c7c9481e8c Intl Era Monthcode: Era boundary tests for japanese calendar
Co-Authored-By: Philip Chimento <pchimento@igalia.com>
2025-11-11 16:08:22 +01:00
Jesse Alama
2ab10be334 Intl Era Monthcode: Era boundary tests for gregory calendar
Co-Authored-By: Philip Chimento <pchimento@igalia.com>
2025-11-11 16:08:22 +01:00
Jesse Alama
f5d6f3474f Intl Era Monthcode: Era boundary tests for ethiopic calendar
Co-Authored-By: Philip Chimento <pchimento@igalia.com>
2025-11-11 16:08:22 +01:00
Jesse Alama
fc93996080 Intl Era Monthcode: Date addition tests for islamic calendars
Co-Authored-By: Philip Chimento <pchimento@igalia.com>
2025-11-11 16:08:22 +01:00
Ben Allen
90889d25cb Intl Era Monthcode: Date addition tests for hebrew calendar
Co-Authored-By: Jesse Alama <jesse@igalia.com>
Co-Authored-By: Philip Chimento <pchimento@igalia.com>
2025-11-11 16:08:22 +01:00
Ben Allen
c6789f4d50 Intl Era Monthcode: Date addition tests for chinese and dangi calendars
Co-Authored-By: Jesse Alama <jesse@igalia.com>
Co-Authored-By: Philip Chimento <pchimento@igalia.com>
2025-11-11 16:08:22 +01:00
Frank Yung-Fong Tang
beeffaf9f0
Sync test to https://github.com/tc39/proposal-intl-locale-info/pull/99
https://github.com/tc39/test262/pull/4417
2025-11-07 11:49:01 -08:00
Philip Chimento
f64d12fba5 Revert "Allow alternative era for Chinese calendar"
This reverts commit d124e1486c007a737411ea7110458e93680b7953 (#4309).
The Intl Era Monthcode proposal precludes this alternative era for the
Chinese calendar, so implementations that have it should not pass the
test.
2025-11-07 11:23:49 -08:00
Ben Allen
dbb186bb07
Added Intl.Era-monthcode to features (#4617)
* Added Intl.Era-monthcode to features for some non-iso8601-related Temporal calendar tests
2025-11-07 11:03:43 -08:00
Philip Chimento
f1433632af
Temporal: Improve check for U+202F NARROW NO-BREAK SPACE in i10n formats (#4641) 2025-11-06 20:07:37 -05:00
Tim Chevalier
ac3035f0d1 Add link to GitHub discussion 2025-11-05 15:42:18 -08:00
Tim Chevalier
df37207881 Temporal: Add test for CalendarYearMonthFromFields with Japanese dates
Japanese eras can begin in the middle of a month. This adds tests for
the existing behavior, which is that PlainYearMonth.from returns
a PlainYearMonth with an era matching the first day of the month,
even when that conflicts with the era given by the argument.

See https://github.com/tc39/proposal-temporal/issues/3150 for more details.
2025-11-05 15:42:18 -08:00
Ben Allen
a723c6ef96
Added test for Islamic calendar fallbacks [intl-era-monthcode] (#4627)
* New tests for islamic and islamic-rgsa calendar fallbacks with feature: Intl.Era-monthcode
2025-11-05 14:12:46 -08:00
Ben Allen
99aa2c22ec
Add test to verify era aliases for non-gregorian calendars (#4631) 2025-11-03 09:17:23 +00:00
Ben Allen
9adf3c0c2f
Added Intl.Era-monthcode test verifying all calendars supported (#4626)
* Added test verifying all calendars required by Intl.Era-monthcode are supported.
2025-10-31 13:43:53 -07:00
André Bargull
b5aac6bc84 String.prototype.toLocale{Lower,Upper}Case validates all locale identifiers 2025-09-25 17:42:28 +02:00
Adam Shaw
2f06e0b6b3
Tests for Temporal issue 3141 (#4568)
* tests for Temporal issue 3141

* added test descriptions

* Temporal tests for total/round related to bug 3141

* tweak tests, fix wording

* don't use unnecessary temporalHelpers

* update tests to include Temporal issues 3148 and 3149

* move tests, update descriptions

* rename some other files

* move new Temporal tests into intl-land

* Actually commit ptomato typo change requests
2025-09-23 19:56:43 +00:00
Philip Chimento
af3d908437 Temporal: Add tests covering one operand of ZonedDateTime difference at extreme
These tests cover the case where the ZonedDateTime since() or until()
methods are called with either the receiver or the argument being a
ZonedDateTime instance at either the earliest or latest end of the
supported range.
2025-09-16 10:42:10 +02:00
Philip Chimento
60faf4f2bb Temporal: Add tests covering end-of-month behaviour for ISO-like non-ISO calendars
Same tests as added in #4004, but for the four non-ISO calendars which
use ISO-like months and days.
2025-09-16 10:42:10 +02:00
Manish Goregaokar
baa48a416c
Fix up calendar tests that rely on eras (#4558)
* Fix up calendar tests that rely on eras

* remove islamic
2025-08-18 17:55:59 -07:00
André Bargull
7ab6423e3a Move two Intl.DateTimeFormat tests 2025-07-07 15:50:31 +02:00
Richard Gibson
fbc6833c24 Test that Intl.Locale language "root" is rejected
cf. https://unicode.org/reports/tr35/#unicode_bcp47_locale_id
2025-06-04 08:51:02 -07:00
Richard Gibson
a4501647e3 Improve test/intl402/Locale/constructor-getter-order.js
* Add a helper for concision
* Specify properties in a different order than the one used for reading
2025-06-04 10:57:38 +02:00
Richard Gibson
c2bfc5bdcd Add tests for Intl.Locale.prototype.variants
Ref https://github.com/tc39/ecma402/pull/960
2025-06-04 10:57:38 +02:00
André Bargull
95d90bf9f2 Add coverage for resolved locale when Unicode extensions and options are present
These tests currently fail in V8, but pass in JSC and SM.
2025-06-01 13:03:50 +02:00
Philip Chimento
5c9ff876dc Temporal: Add test coverage for sub-minute UTC offsets in strings
Expands and updates (following the normative change in
https://github.com/tc39/proposal-temporal/pull/3107, approved May 2025)
the current coverage with cases where the number of seconds is
incorrect, or rounded.

Adds missing coverage for sub-minute offsets in strings passed to
Temporal.ZonedDateTime.compare.

Adds the unusual test case of Pacific/Niue on October 15, 1952, where
the offset shifted by 20 seconds to a whole-minute boundary.

Fixes a few minor errors in the existing tests such as a missing ] in a
string, and the wrong sign for the offset in Africa/Monrovia in property
bags.
2025-05-31 20:46:32 +02:00
André Bargull
081cbfc975 Fix PluralRules notation test
- Change the locale to "fr", it's more likely to be present in
  implementations when compared to "sl".
- Test all possible "notation" values.
2025-05-26 15:02:48 +02:00
André Bargull
b3d0c57f7f Move PluralRules notation into correct directory 2025-05-26 15:02:48 +02:00
André Bargull
7d0984ba52 Fix bugs for PluralRules notation 2025-05-26 15:02:48 +02:00
André Bargull
3316c0aaf6 Test all combinations in temporal-plaindatetime-formatting-datetime-style 2025-05-22 14:24:47 +02:00
André Bargull
96695862e2 Test all combinations in temporal-plainyearmonth-formatting-datetime-style 2025-05-22 14:24:47 +02:00
André Bargull
a55bf7da9e Test all combinations in temporal-plainmonthday-formatting-datetime-style 2025-05-22 14:24:47 +02:00
André Bargull
24f6f7a014 Test all combinations in temporal-plaindate-formatting-datetime-style 2025-05-22 14:24:47 +02:00
André Bargull
c3db26368f Test all combinations in temporal-plaintime-formatting-datetime-style 2025-05-22 14:24:47 +02:00
André Bargull
36c81b9761 Split temporal-objects-formatting.js into separate files for each Temporal type 2025-05-22 14:24:47 +02:00
André Bargull
ef71f5e2a6 Fix expected result for short date-style
Compare to `dateTimeFormatterShortMedium`, which also uses the
`short` date-style.
2025-05-22 14:24:47 +02:00
André Bargull
e8e50b5746 Place closing parenthesis at the correct location 2025-05-22 14:24:47 +02:00
Ujjwal Sharma
453887559d Add 'notation' option to PluralRules tests and update related assertions
Refs: https://github.com/tc39/ecma402/pull/989
2025-05-14 10:43:30 -07:00
Philip Chimento
8fa9d38753
Temporal: Make gregory week numbers undefined (#4467) 2025-05-14 13:20:36 -04:00
Philip Chimento
118db52dd4
Temporal: Add coverage for getTimeZoneTransition edge cases (#4466)
getTimeZoneTransition return values should always correspond with UTC
offset transitions, not with time zone metadata changes such as making
DST permanent or updating abbreviation strings.

See: https://github.com/tc39/proposal-temporal/issues/3105
2025-05-14 13:04:43 -04:00
Philip Chimento
20d4558f39
Temporal: Add test coverage for close-together time zone transitions (#4471)
Check that implementations correctly detect time zone transitions that
are close together. Additionally, test startOfDay() since the time zone
transitions in Brazil occur at midnight.

See https://github.com/tc39/proposal-temporal/issues/3110
2025-05-14 12:27:19 -04:00
Richard Gibson
545df3a432
Fix front matter for test/intl402/Locale/prototype/region/prop-desc.js (#4475) 2025-05-08 18:53:11 -04:00
Philip Chimento
ac9ff9bf75 Add coverage for remapping of eras in Temporal dates
See note 2 on eras in CalendarResolveFields:
https://tc39.es/proposal-temporal/#sec-temporal-calendarresolvefields

This behaviour was not yet covered by any test262 tests.

Based on Anba's tests from https://github.com/tc39/test262/pull/4080 but
with different behaviour.
2025-04-29 13:45:50 +02:00
Tim Chevalier
64237beb0d Fix annotations 2025-04-23 11:51:56 -07:00
Tim Chevalier
0e0bf3c6bd Fix locale 2025-04-23 11:51:56 -07:00
Tim Chevalier
2107067d2e Rewrite tests to check for substrings rather than checking the entire output against an expected string 2025-04-23 11:51:56 -07:00
Tim Chevalier
c3b2287d2b Temporal: Add test for different combinations of DateTimeFormat options
This test file adds tests for all types of Temporal objects and various
combinations of style options for Intl.DateTimeFormat.
2025-04-23 11:51:56 -07:00