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-10245] NumberFormatter behaves difference between macOS and Linux #3499

Closed
SusanDoggie opened this issue Mar 31, 2019 · 2 comments
Closed
Assignees

Comments

@SusanDoggie
Copy link

Previous ID SR-10245
Radar None
Original Reporter @SusanDoggie
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee @spevans
Priority Medium

md5: f147bbb6d13455a40904fa262c2155dc

Issue Description:

The following codes behave differently between macOS and Linux.

let formatter = NumberFormatter()
formatter.negativeFormat = "#.#########"
formatter.positiveFormat = "#.#########"

var a = 0.5

print(formatter.string(from: NSNumber(value: a)))

macOS, swift 5
output: 0.5

Docker swift:4.1
output: 0

Docker vapor/swift:5.0
output: 0

@weissi
Copy link
Member

weissi commented Mar 31, 2019

CC @spevans & @millenomi

@spevans
Copy link
Collaborator

spevans commented Apr 5, 2019

#2062

@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

3 participants