Repository navigation
fix(temporal): #5900 — honor options.calendar + reject invalid date/time style in toLocaleString #5979
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
Merged
Merged
fix(temporal): #5900 — honor options.calendar + reject invalid date/time style in toLocaleString #5979
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🌐 Web query:
temporal_rs 0.2.3 Calendar::try_from_utf8 case sensitivity💡 Result:
In temporal_rs version 0.2.3, the Calendar::try_from_utf8 function is case-insensitive [1]. The internal implementation of Calendar::try_kind_from_utf8 explicitly handles case insensitivity by converting the input byte slice to lowercase using to_ascii_lowercase before parsing the calendar identifier [1]: let icu_locale_value = Value::try_from_utf8(&bytes.to_ascii_lowercase).map_err(|_| TemporalError::range.with_message("unknown calendar"))?; Additionally, the library includes unit tests that confirm this behavior, such as parsing strings like "iSo8601" and "iSO8601" successfully as the default ISO 8601 calendar [1]. This aligns with the broader requirement for Temporal implementations to treat calendar names as case-insensitive [2].
Citations:
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 17856
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 5887
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 9582
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 6738
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 3854
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 22786
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 5123
Coerce
options.calendarbefore parsing it.formatter_calendarreads the raw property and passes it straight toread_string, so non-string values skipToString/GetOption(type: string)semantics and can be misread instead of converted.temporal_rs::Calendar::try_from_utf8already handles mixed-case IDs, so the remaining fix is to use the string-option coercion path here.🤖 Prompt for AI Agents