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
My environment: Xcode Version 10.0 beta 3 (10L201y) Swift version 4.0
md5: 7b4a04ce19b94c22929957bd1dccb5b4
Issue Description:
I'm printing the minute from a date like "1901-01-01 00:00:00 +0000" and getting value equals "53".
the code executed from Playgrounds:
extension Date {
static var fullFormat = "yyyy-MM-dd H:mm:ss ZZZZ"
static func fromString(_ dateString: String, dateFormat: String)-> Date
{ let dateFormatter = DateFormatter() dateFormatter.dateFormat = dateFormat let date = dateFormatter.date(from: dateString) return date! }
var minute: Int
{ var components = Calendar.current.dateComponents([.minute], from: self) return components.minute! }
}
let d = Date.fromString("1901-01-01 00:00:00 +0000", dateFormat: Date.fullFormat) print(d.minute)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment
My environment:
Xcode Version 10.0 beta 3 (10L201y)
Swift version 4.0
Additional Detail from JIRA
md5: 7b4a04ce19b94c22929957bd1dccb5b4
Issue Description:
I'm printing the minute from a date like "1901-01-01 00:00:00 +0000" and getting value equals "53".
the code executed from Playgrounds:
extension Date {
static var fullFormat = "yyyy-MM-dd H:mm:ss ZZZZ"
static func fromString(_ dateString: String, dateFormat: String)-> Date
{ let dateFormatter = DateFormatter() dateFormatter.dateFormat = dateFormat let date = dateFormatter.date(from: dateString) return date! }
var minute: Int
{ var components = Calendar.current.dateComponents([.minute], from: self) return components.minute! }
}
let d = Date.fromString("1901-01-01 00:00:00 +0000", dateFormat: Date.fullFormat)
print(d.minute)
The text was updated successfully, but these errors were encountered: