Rupert

::Me(C#,VC,MonoTouch,MonoforAndroid);

导航

cocoa中获取时间

Posted on 2014-06-11 22:37  ArRan  阅读(178)  评论(0编辑  收藏  举报

头文件#import "Foundation/NSCalendarDate.h"

+ (id)calendarDate;

- (int)yearOfCommonEra;
- (int)monthOfYear;
- (int)dayOfMonth;
- (int)dayOfWeek;
- (int)dayOfYear;
- (int)dayOfCommonEra;
- (int)hourOfDay;
- (int)minuteOfHour;
- (int)secondOfMinute;
代 码部分:
NSCalendarDate* NowDate;
NowDate=[NSCalendarDate calendarDate];
int ii = [NowDate minuteOfHour];