今日の日付 (ヘブライ日付) をラベル (カレンダーではない) で表示したい。
どうすればいいNSDate
ですか?
ありがとう!
これを使用して日付をフォーマットします。
NSLocale *hebrew = [[NSLocale alloc] initWithLocaleIdentifier:@"he_IL"];
NSDateFormatter *format = [[NSDateFormatter alloc] init];
format.locale = hebrew;
[format setDateFormat:@"MMM dd, yyyy HH:mm"];
NSDate *now = [NSDate date];
NSString *today = [format stringFromDate:now];
UILabel *lbl = [[UILabel alloc] initWithFrame:CGRectMake(30, 40, 240, 30)];
lbl.text = today;
NSLog(@"today: %@", today);