Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
UIDatepickerから取得したNSDateがあります。
IBOutlet UIDatePicker *dueDate; NSDate *selectedDate = [dueDate date];
dueDateの形式で月を取得するにはどうすればよいintですか?(1月に1つ、2月に2つなど)
dueDate
int
たとえば、次の例を使用-[NSCalendar components:fromDate:]します。
-[NSCalendar components:fromDate:]
http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSCalendar_Class/Reference/NSCalendar.html