Hey All,
I have been combing the inter-webs looking for an answer to this question. Thus far no luck.
I have a VERY long JSON file that I need to find a day on based on today’s date. There are no dates in the JSON, just weeks of the year.
What I thought of doing is adding a weekOfYear to the JSON, and provide the number of the week.
I have a Calendar method that provides me the .weekOfYear based on a specific date but it returns a Date type.
So finally to my question. If I add the “47” to the JSON and add var weekOfYear:Date! to my model; when Swift creates the array from the JSON, will it be a Date type?
I then need to loop through the array to find the week based on this Date number in the JSON, then I can find the day, as I have a different method to return today’s day.
Make sense?
Thanks for any ideas you can send my way.
Blessings,
—Mark