Skip to content

Latest commit

 

History

History
18 lines (16 loc) · 450 Bytes

getDateOfBirth().md

File metadata and controls

18 lines (16 loc) · 450 Bytes

Get the date of birth.

On success, the callback function will be provided with a res object containing dob value: string (ISO timestamp), and age: number (age in years):

AppleHealthKit.getDateOfBirth(null, (err: Object, results: Object) => {
    if (this._handleHealthkitError(err, 'getDateOfBirth')) {
        return;
    }
    console.log(results)
});
{
	value: '1986-09-01T00:00:00.000-0400',
	age: 29
}