duration formula in swap makes no sense

I’m having difficulty understanding the duration-related formula in Swaps.

the position of the pay-fixed party in a pay-fixed, receive-floating swap (D_pay_floating) has the duration of a floating-rate bond (D_floating) minus the duration fo a fixed-rate bond (D_fixed).

i.e. D_pay_floating= D_floating-D_fixed

I understand the floating-rate bond’s duration is approximately the amount of time to maturity, that’s all I can recall.

Thanks in advance.

The (effective) duration of the floating-rate leg (bond) is generally given as half the time between coupon payments, not the time to maturity. The reason is that at every coupon date the value resets to par (or very close to it).

The (effective) duration of the fixed-rate leg (bond) is somewhat shorter than the time to maturity; they often use 75% of the time to maturity.