yearDiff(new Date('2022-07-01'), new Date('2020-7-1')); // 2
yearDiff(new Date('2022-07-02'), new Date('2020-7-1')); // 2.002
yearDiff(new Date('2022-07-01'), new Date('2022-1-1')); // 0.5
yearDiff(new Date('2022-1-1'), new Date('2022-07-01')); // -0.5
yearDiff(new Date('2022-1-30'), new Date('2022-01-31')); // -0.002
计算两个日期间相差的年数 a - b