We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Ubuntu 14.04 with Swift version 2.2-dev (LLVM 46be9ff861, Clang 4deb154edc, Swift 778f829) Target: x86_64-unknown-linux-gnu
md5: a496382187495b94fd7961062de2d604
Issue Description:
The following code:
import Foundation let dateFormatter = NSDateFormatter() dateFormatter.dateFormat = String("dd-MM-yyyy") var dateStr = dateFormatter.stringFromDate(NSDate()) print("With dateFormat '\(dateFormatter.dateFormat)': '\(dateStr)'") dateFormatter.dateStyle = .MediumStyle dateFormatter.timeStyle = .MediumStyle dateStr = dateFormatter.stringFromDate(NSDate()) print("With dateStyle and timeStyle set to .MediumStyle: '\(dateStr)'")
should result in
With dateFormat 'dd-MM-yyyy': '12-12-2015' With dateStyle and timeStyle set to .MediumStyle: 'Dec 12, 2015, 9:46:33 PM'
Instead it results in:
With dateFormat 'dd-MM-yyyy': '' With dateStyle and timeStyle set to .MediumStyle: 'Dec 12, 2015, 9:46:33 PM'
It appears that setting the dateFormat property of a NSDateFormatter instance has no effect.
dateFormat
NSDateFormatter
The text was updated successfully, but these errors were encountered:
Comment by Joe (JIRA)
Note: The swift compiler used was compiled with the latest sources on Github, but this issue is reproducible with both SNAPSHOT releases from Apple.
Sorry, something went wrong.
Comment by Taylor Franklin (JIRA)
assigning myself per discussion here https://lists.swift.org/pipermail/swift-corelibs-dev/Week-of-Mon-20160215/subject.html
Resolved with this pull request: #288 See TestNSDateFormatter.swift for working example.
No branches or pull requests
Environment
Ubuntu 14.04 with
Swift version 2.2-dev (LLVM 46be9ff861, Clang 4deb154edc, Swift 778f829)
Target: x86_64-unknown-linux-gnu
Additional Detail from JIRA
md5: a496382187495b94fd7961062de2d604
Issue Description:
The following code:
should result in
Instead it results in:
It appears that setting the
dateFormat
property of aNSDateFormatter
instance has no effect.The text was updated successfully, but these errors were encountered: