Use terminal to get Mac battery manufacture date/age How do I get the manufacture date or age like what's shown in CoconutBattery using the terminal? I tried ioreg -cr AppleSmartBattery which gave a ManufacturerData (data, not date, but it was a date format) that's way too old to be correct for my computer. system_profiler SPPowerDataType doesn't show anything related to what I want.
EDIT: there is a ManufactureDate line in ioreg, but it's a 5 digit number – how do I decode that?
According to the Smart Battery Data spec, the ManufactureDate is as follows:

The date is packed in the following fashion: (year-1980) * 512 + month * 32 + day

More specifically, when the integer is converted to binary:
bits 0-4  -- day
bits 5-8 -- month
bits 9-15 -- years since 1980

Verifying this using my own machine, the integer derives to something like 2018-x-x, which makes sense given the age of my laptop.
( On Big Sur with my work laptop, however, the value is no longer a small integer, so I'm not sure how the latest OS is encoding the date information )