Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Add support for dayPeriod and fractionalSecondDigits in Intl.DateTimeFormat #1218

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ewlsh
Copy link

@ewlsh ewlsh commented Dec 12, 2023

Summary

This PR adds support for dayPeriod and fractionalSecondDigits within Intl.DateTimeFormat on Apple and Android platforms.

On Apple we already had partial support for fractionalSecondDigits, but it was implemented with a bug - missing break; statements in a switch meant that the skeleton was incorrectly composed.

On Android we lacked support for dayPeriod and fractionalSecondDigits, on Android we can only support "flexible day period" (ICU/Unicode naming) on Android Pie (28), so for older versions we fallback to "am"/"pm"

Test Plan

The Intl test suite has been updated to run dayPeriod and fractionalSecondDigits conformance tests

Many tests which use "const" are not actually testing the behavior of
the "const" keyword, they are just using it as it is standard practice
in newer JavaScript versions.

This allows allowlisting individual tests or directories which use
"const".

This commit additionally updates the skiplist for ECMA-402 2024
Also update the Android test262 runner to print the individual
testcases for debugging and visibility.
In DateTimeFormat the switch statement for the fractionalSecondDigits
skeleton currently is missing "break" statements - leading to incorrect
skeleton strings (e.g. SSSSSSS)
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants