Value of type '[String]' has no member 'weekdayAndDateStampDateFormatter'
- Dominant language
- Swift
- Stars
- 4.6k
- Forks
- 588
- PR merge metrics
- No merged PRs in 30d
Description
extension Date {
private static let weekdayAndDateStampDateFormatter: DateFormatter = {
let dateFormatter = DateFormatter()
dateFormatter.timeZone = TimeZone.autoupdatingCurrent
dateFormatter.dateFormat = "EEEE, MMM dd yyyy" // "Monday, Mar 7 2016"
return dateFormatter
}()
func toWeekDayAndDateString() -> String {
return Date.weekdayAndDateStampDateFormatter.string(from: self)
}
}
In toWeekDayAndDateString function not able to access weekdayAndDateStampDateFormatter
Contributor guide
Research direction
Start with the Date extension and toWeekDayAndDateString function shown in the report, then reproduce the compiler error in the affected Swift target. Done when the formatter reference compiles and the date-string behavior is verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100