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

[SR-7481] NumberFormatter inconsistency on Linux #3718

Closed
stephencelis opened this issue Apr 19, 2018 · 2 comments
Closed

[SR-7481] NumberFormatter inconsistency on Linux #3718

stephencelis opened this issue Apr 19, 2018 · 2 comments
Assignees

Comments

@stephencelis
Copy link
Contributor

Previous ID SR-7481
Radar None
Original Reporter @stephencelis
Type Bug
Status Resolved
Resolution Done
Environment

Swift 4.1.

Additional Detail from JIRA
Votes 1
Component/s Foundation
Labels Bug
Assignee @spevans
Priority Medium

md5: a3432fee9e9e86730a3af7ff9269d820

Issue Description:

import Foundation
var numberFormatter = NumberFormatter()
numberFormatter.numberStyle = .currency
print(numberFormatter.string(from: NSNumber(value: 0)))

The code above prints "$0.00" on macOS, "$.00" on Linux.

@stephencelis
Copy link
Contributor Author

Why was this closed? I'm looking at the code in swift-corelibs-foundation on master and using the `numberStyle` `currency` still doesn't set the `minimumIntegerDigits` to `1` when `0`.

@spevans
Copy link
Collaborator

spevans commented Apr 21, 2018

#1530

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants