8
NSDateComponents를 사용할 때 Am 또는 Pm으로 시간을 설정하고 있음을 어떻게 알 수 있습니까? 아니면 24 시간 형식입니까? 코드는 다음과 같습니다.NSDateComponents에서 오전 또는 오후인지 어떻게 알 수 있습니까?
NSDate *morningEnd = [NSDate date];
NSDateComponents *components1 = [gregorian components:NSUIntegerMax fromDate:morningEnd];
[components1 setHour:11];
[components1 setMinute:59];
오전 11시 59 분 또는 오후 11:59로 설정하면 어떻게됩니까?
그래, 24 시간 형식입니까? – SunnyChopper
이 맞습니다. – drewag
정말 1 기반입니까? 0-11과 12-23은 의미가 있습니다. –