How to create a series of dates in Cocoa throughout the week
I am currently writing an application and must show the current days of the week.
So, for the coming week, I need to generate subsequent dates.
Monday, January 5, 2009 Tuesday, January 6, 2009 Wednesday, January 7, 2009 Thursday, January 8, 2009 Friday, January 9, 2009
I have already coded an application to generate five dates from today's date. The problem I have is to find a way to create from Monday to Friday this week.
I am running OS X 10.5 and using the Cocoa environment.
+1
source to share
1 answer
Have a look at NSCalendar and NSDateComponents .
If you haven't, you should read Topics for Dates and Times for Cocoa for more information / help.
+4
source to share