我需要使用日期时间和当前位置的纬度和经度来计算Nakshatra和Thithi 。
日期从
NSDate *today = [NSDate date];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
// display in 12HR/24HR (i.e. 11:25PM or 23:25) format according to User Settings
[dateFormatter setTimeStyle:NSDateFormatterShortStyle];
NSString *currentTime = [dateFormatter stringFromDate:today];
[dateFormatter release];
经度和纬度值来自NSLocationManager
. 有人可以阐明数学计算吗?