Although not all insurance providers offer this provision, several companies are now allowing travellers to cancel or alter their travel plans if their destination city/country is affected by terrorist activities within a few days of scheduled arrival.

There is no hard and fast number of days you have to calculate, but anything between 7-30 days should be a decent time frame to alter travel plans in light of terrorist activities.