Brake fluid eventually becomes contaminated with moisture and other contaminants, but should normally be good for three years. It can be tested for moisture/contaminants.
I am ashamed to say I changed mine (dot4) at 19yrs (60,000 miles) and although some dirt came out it was relatively clean and I have never had any 'spongy' braking problems.
Please don't take this time scale as adequate.