export const getDeviceAgeInYears = ( commissioningDate ) => { const registerDate = new Date ( commissioningDate ) ; const nowDate = new Date ( ) ; return nowDate . getFullYear ( ) - registerDate . getFullYear ( ) ; } ;