date(era:yearForWeekOfYear:weekOfYear:weekday:hour:minute:second:nanosecond:)
Returns a new date created with the given components base on a week-of-year value.
Declaration
func date(era eraValue: Int, yearForWeekOfYear yearValue: Int, weekOfYear weekValue: Int, weekday weekdayValue: Int, hour hourValue: Int, minute minuteValue: Int, second secondValue: Int, nanosecond nanosecondValue: Int) -> Date?Parameters
- eraValue:
The value for the era component.
- yearValue:
The value for the year component.
- weekValue:
The value for the week-of-year component.
- weekdayValue:
The value to use as the weekday.
- hourValue:
The value for the hour component.
- minuteValue:
The value for the minute component.
- secondValue:
The value for the second component.
- nanosecondValue:
The value for the nanosecond component.
Return Value
A new NSDate instance created with the given components based on a week-of-year calculation, or nil if the components do not correspond to a valid date.