From my code, i get manufacture date as below:
.....
- (NSDictionary *)getBatteryInfo
{
matching = IOServiceNameMatching("AppleSmartBattery");
entry = IOServiceGetMatchingService(kIOMasterPortDefault, matching);
IORegistryEntryCreateCFProperties(entry, &properties, NULL, 0);
return (__bridge NSDictionary *)properties;
}
......
NSDictionary *Info = [self getBatteryInfo];
NSNumber *manufacturerDate = [Info objectForKey:@"ManufactureDate"];
I tried these codes in a macbook and get 17492 for the date, and I also check the date with a app installed from App store and know the exact date is 2014/02/20.
In another macbook, i get 16727 for the date, and the exact date is 2012/10/23. Who can tell me how to calculate the exact date with this 5 digit number.
Date is published in a bitfield per the Smart Battery Data spec rev 1.1 in section 5.1.26 (see)
UPD. Example
17492 is in binary notation 0100010001010100 (unsigned interpretation for 16-bit number). So,
Thus, we've got that 17492 is 2014/02/20