fixed getLocalData - added condition to clear old storage data.
added alert for bad format date